Messages in this thread | | | Date | Sun, 18 Nov 2012 20:32:35 +0100 | From | Oleg Nesterov <> | Subject | Re: [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.
| |