lkml.org 
[lkml]   [2012]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -mm] percpu_rw_semaphore-reimplement-to-not-block-the-readers-unnecessari ly.fix
On 11/16, Andrew Morton wrote:
>
> On Sun, 11 Nov 2012 19:27:44 +0100
> Oleg Nesterov <oleg@redhat.com> wrote:
>
> > lib/percpu-rwsem.c | 35 +++++++++++++++++++++++++++++++++--
>
> y'know, this looks like a great pile of useless bloat for single-CPU
> machines. Maybe add a CONFIG_SMP=n variant which simply calls the
> regular rwsem operations?

Yes, I thought about this and probably I'll send the patch...

But note that the regular down_read() won't be actually faster if
there is no writer, and it doesn't allow to add other features.

I'll try to think, perhaps it would be enough to add a couple of
"ifdef CONFIG_SMP" into this code, say, to avoid __percpu.

Oleg.



\
 
 \ /
  Last update: 2012-11-18 21:01    [W:0.096 / U:1.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site