Re: [PATCH] Re: Negative scalability by removal of lock_kernel()?(Was: Strange performance behavior of 2.4.0-test9)

Andi Kleen
2000-10-28T15:58:32Z

On Sun, Oct 29, 2000 at 02:46:14AM +1100, Andrew Morton wrote:
> kumon@flab.fujitsu.co.jp wrote:
> >
> > Change the following two macros:
> > acquire_fl_sem()->lock_kernel()
> > release_fl_sem()->unlock_kernel()
> > then
> > 5192 Req/s @8cpu is got. It is same as test8 within fluctuation.
>
> hmm.. BKL increases scalability. News at 11.
>
> The big question is: why is Apache using file locking so
> much? Is this normal behaviour for Apache?

It serializes accept() to avoid the thundering herd from the wake-all
semantics.

With the 2.4 stack that is probably not needed anymore (it was in 2.2),
it may just work to remove the file locking (it should always be correct,
just on 2.2 it may be slower to remove it)

> Because if so, the file locking code will be significantly
> bad for the scalability of Apache on SMP (of all things!).
> It basically grabs a big global lock for _anything_. It
> looks like it could be a lot more granular.

iirc everybody who looked at the code agrees that it needs a rewrite
badly.

-Andi