lkml.org 
[lkml]   [2008]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH -v3 1/7] kexec jump: clean up #ifdef and comments
Andrew Morton <akpm@linux-foundation.org> writes:

> On Tue, 12 Aug 2008 11:14:21 +0800 Huang Ying <ying.huang@intel.com> wrote:
>
>> xchg(&kexec_lock, 0);
>
> kernel/kexec.c: In function 'kernel_kexec':
> kernel/kexec.c:1501: warning: value computed is not used

A good question is why we are warned.

> Is there any reason why we cannot use the more conventional
> test_and_set_bit() etc, rather than this peculiarity?
>
> Or perhaps spin_trylock?

Totally odd.

Let me stop and take a look and see what has been changed. The original
code used a xchg based read copy update scheme, which was extremely
compatible with a lot of goals. The primary one being no blocking paths
in a successful kexec, and minimal dependence on library functions.

We need that minimal dependence to handle the kexec on panic case.

That doesn't rule out something like test_and_set_bit.

Eric


\
 
 \ /
  Last update: 2008-08-13 06:55    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site