Re: [PATCH] BUG(): sched.c: Line 944

Linus Torvalds
2002-09-17T15:22:02Z

On 17 Sep 2002, Robert Love wrote:
>
> Now, remind me why this is all worth it...

I really think we need this to have a stable system. Alan still thinks
preempt is unstable, and this helps counter some of that - by adding
sanity checks that all the counters are doing the right thing.

Also, it's one more reason to support preemption in the first place.
Having lower latency is all fine, but not everybody cares and clearly
preemption adds its own overhead. Having the preemption infrastructure add
its own set of help (ie helping find not only preempt-related bugs, but
spinlock bugs too) makes preempt all the more useful.

In particular, with preempt we can add atomicity debugging to "put_user()"
and friends, to verify that nobody tries to do user-mode accesses when
they aren't allowed to - another use for "in_atomic()". But that's
requires a functioning in_atomic() that isn't too limited to be generally
used..

Linus