Re: [RFC] New locking primitive for 2.5

Alexander Viro (viro@math.psu.edu)
Fri, 8 Feb 2002 14:21:58 -0500 (EST)


On Fri, 8 Feb 2002, Linus Torvalds wrote:

> ... so just make it a spinlock instead.
>
> The semaphore is overkill, as the only thing we're really protecting is
> one 64-bit access against other updates.

I'm not sure that we really need a separate spinlock here. BKL might
be just fine, provided that we remove it from real hogs. And we can
do it now.

Had anyone actually seen lseek() vs. lseek() contention prior to the
switch to ->i_sem-based variant? If the mix looked like
infrequently called BKL hog + many lseeks()
almost all contention cases would have lseek() spinning while
a hog holds BKL. And real problem here is a hog...

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/