lkml.org 
[lkml]   [2008]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kexec jump: fix compiling warning on xchg(&kexec_lock, 0) in kernel_kexec()
On Wed, 13 Aug 2008 10:01:13 -0700 (PDT) Linus Torvalds <torvalds@linux-foundation.org> wrote:

>
>
> On Wed, 13 Aug 2008, Andrew Morton wrote:
> >
> > We don't need to create that local. I queued this:
>
> No, please don't.
>
> Just don't take this whole patch-series until it's cleaned up.

We already took it - in 2.6.13!

> There is
> absolutely no excuse for using xchg as a locking primitive. Nothing like
> this should be queued anywhere, it should be burned and the ashes should
> be scattered over the atlantic so that nobody will ever see them again.
>
> F*ck me with a spoon, if you have to use xchg() to do a trylock, why the
> hell isn't the unlock sequence then
>
> smp_mb();
> var = 0;
>
> instead? Not that that's really right either, but at least it avoids the
> _ridiculous_ crap. The real solution is probably to use a spinlock and
> trylock/unlock.
>

Or test_and_set_bit(). That's what I've been saying too, only
differently ;)

But cleaning up the long-standing silly usage of xchg() is a different
activity from suppressing this recently-added compile warning.



\
 
 \ /
  Last update: 2008-08-13 19:29    [W:0.064 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site