Re: [patch 0/3] j_state_lock, j_list_lock, remove-bitlocks

Ingo Molnar
2005-03-16T10:13:31Z

* Andrew Morton <akpm@osdl.org> wrote:

> Ingo Molnar <mingo@elte.hu> wrote:
> >
> > > There's a little lock ranking diagram in jbd.h which tells us that
> > > these locks nest inside j_list_lock and j_state_lock. So I guess
> > > you'll need to turn those into semaphores.
> >
> > indeed. I did this (see the three followup patches, against BK-curr),
> > and it builds/boots/works just fine on an ext3 box. Do we want to try
> > this in -mm?
>
> ooh, I'd rather not. I spent an intense three days removing all the
> sleeping locks from ext3 (and three months debugging the result).
> Ended up gaining 1000% on 16-way.
>
> Putting them back in will really hurt the SMP performance.

ah. Yeah. Sniff.

if we gain 1000% on a 16-way then there's something really wrong about
semaphores (or scheduling) though. A semaphore is almost a spinlock, in
the uncontended case - and even under contention we really (should) just
spend the cycles that we'd spend spinning. There will be some
intermediate contention level where semaphores hurt, but 1000% sounds
truly excessive.

Ingo