lkml.org 
[lkml]   [2012]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 1/1] percpu_rw_semaphore: reimplement to not block the readers unnecessarily


On Wed, 7 Nov 2012, Oleg Nesterov wrote:

> On 11/07, Mikulas Patocka wrote:
> >
> > It looks sensible.
> >
> > Here I'm sending an improvement of the patch - I changed it so that there
> > are not two-level nested functions for the fast path and so that both
> > percpu_down_read and percpu_up_read use the same piece of code (to reduce
> > cache footprint).
>
> IOW, the only change is that you eliminate "static update_fast_ctr()"
> and fold it into down/up_read which takes the additional argument.
>
> Honestly, personally I do not think this is better, but I won't argue.
> I agree with everything but I guess we need the ack from Paul.

If you look at generated assembly (for x86-64), the footprint of my patch
is 78 bytes shared for both percpu_down_read and percpu_up_read.

The footprint of your patch is 62 bytes for update_fast_ctr, 46 bytes for
percpu_down_read and 20 bytes for percpu_up_read.

Mikulas


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