xfs
[Top] [All Lists]

Re: TAKE 950027 - xfs_icsb_lock_all_counters fails with CONFIG_PREEMPT a

To: Andi Kleen <ak@xxxxxxx>
Subject: Re: TAKE 950027 - xfs_icsb_lock_all_counters fails with CONFIG_PREEMPT and >=256p
From: Linus Torvalds <torvalds@xxxxxxxx>
Date: Thu, 2 Mar 2006 08:53:51 -0800 (PST)
Cc: David Chinner <dgc@xxxxxxx>, linux-xfs@xxxxxxxxxxx, mingo@xxxxxxx, tony.luck@xxxxxxxxx
In-reply-to: <200603021309.46495.ak@suse.de>
References: <20060301125320.20FDA49F1681@chook.melbourne.sgi.com> <p73fym1zbqo.fsf@verdi.suse.de> <20060302065807.GG1173973@melbourne.sgi.com> <200603021309.46495.ak@suse.de>
Sender: linux-xfs-bounce@xxxxxxxxxxx

On Thu, 2 Mar 2006, Andi Kleen wrote:
> 
> I suspect 256 softirq nestings are not needed, so how about setting 
> PREEMPT_BITS to 16 and SOFTIRQ_BITS to 4 and hardirq bits
> to 11 and PREEMPT_ACTIVE to 31?

I'd rather be a bit more gentle: instead of taking away _half_ the SOFTIRQ 
bits, take away just one or two. The HARDIRQ bits are also pretty 
dangerous, I'd say. So I'm not happy with your choice of numbers.

Right now we actally have three bits unused, I think, so it would be much 
better to just make PREEMPT_ACTIVE be 31, and just make PREEMPT_BITS be 
11. Problem solved, without making anything worse.

> I don't see anything that would rely on the count being positive
> so using the sign bit is probably ok. Hardirq 11 might be a bit
> tight though, so maybe it would be better to move 64bit machines
> to 64bit here.

And yes, I think it may make sense to just use the full 64 bits on a 
64-bit machine. Eventually. Somebody should check what the larger 
constants result in, though.

And not for now, but obviously the 11 bits will run out for even bigger 
machines. But for a "let's fix it quickly", adding three bits should be 
plenty good enough, no?

Need to check the things that check PREEMPT_ACTIVE, but making i tbit #31 
migt actually _help_ (you can test it more easily).

                Linus


<Prev in Thread] Current Thread [Next in Thread>