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
On Wed, 7 Jan 2009 22:32:22 +0100
Ingo Molnar <mingo@elte.hu> wrote:

> > We could do the whole "oldfs = get_fs(); set_fs(KERNEL_DS); ..
> > set_fs(oldfs);" crud, but it would probably be better to just add an
> > architected accessor. Especially since it's going to generally just be a
> >
> > #define get_kernel_careful(val,p) __get_user(val,p)
> >
> > for most architectures.
> >
> > We've needed that before (and yes, we've simply mis-used __get_user() on
> > x86 before rather than add it).
>
> for the oldfs stuff we already have probe_kernel_read(). OTOH, that
> involves pagefault_disable() which is an atomic op

tisn't. pagefault_disable() is just preempt_count()+=1;barrier() ?

Am suspecting that you guys might be over-optimising this
contended-path-were-going-to-spin-anyway code?


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