lkml.org 
[lkml]   [2009]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -v5][RFC]: mutex: implement adaptive spinning

* Linus Torvalds <torvalds@linux-foundation.org> wrote:

> /*
> * Even if the access succeeded (likely case),
> * the cpu field may no longer be valid. FIXME:
> * this needs to validate that we can do a
> * get_cpu() and that we have the percpu area.

s/get_cpu/cpu_rq ?

> */
> if (cpu >= NR_CPUS)
> break;
>
> if (!cpu_online(cpu))
> break;

Regarding the FIXME, this should be safe already - at least on x86 we set
up all the possible-cpus-mask per CPU areas during bootup. So any CPU that
is online, will have a percpu area. (even in the most racy case)

Ingo


\
 
 \ /
  Last update: 2009-01-07 22:31    [W:0.302 / U:0.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site