[lkml]   [2000]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch]2.4.0-test6 "spinlock" preemption patch
On Mon, 11 Sep 2000, Rik van Riel wrote:

>Hmmm, maybe the Montavista people can volunteer to clean
>up all those places in the kernel code? ;)

That would be nice and welcome indipendently of the preemptible kernel
indeed. The right construct to convert that stuff is
spin_is_locked/spin_trylock (so spin_trylock will take care to forbid
kernel reschedules within the critical section).

One example that cames to mind to better show what this cleanup consists
of (not a matter to this case because it's code that doesn't get compiled
in UP) is the global_irq_lock variable. The i386 one is the example of the
old style one and the alpha one is the new style spin_is_locked/trylock

The new rule should be that places that uses test_and_set_bit should never
spin. They can be of course schedule-locks like lock_page() (infact being
a schedule aware lock still means not to spin on the lock :).

Those cleanups can start in the 2.4.x timeframe but I'd rather not depend
on them during 2.4.x to have a stable kernel. (2.5.x looks a better time
to change such an ancient API) This is just my humble opinion of course.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:38    [W:0.047 / U:5.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site