lkml.org 
[lkml]   [2011]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [patch v2 0/5] percpu_counter: bug fix and enhancement
    From
    Date
    On Wed, 2011-05-11 at 17:28 +0800, Tejun Heo wrote:
    > Hey, Shaohua.
    >
    > On Wed, May 11, 2011 at 04:10:12PM +0800, Shaohua Li wrote:
    > > The new implementation uses lglock to protect percpu data. Each cpu has its
    > > private lock while other cpu doesn't take. In this way _add doesn't need take
    > > global lock anymore and remove the deviation. This still gives me about
    > > about 5x ~ 6x faster (not that faster than the original 7x faster, but still
    > > good) with the workload mentioned in patch 4.
    >
    > I'm afraid I'm not too thrilled about lglock + atomic64 usage. It is
    > a very patchy approach which addresses a very specific use case which
    > might just need a higher @batch.
    It's quite hard to get a higher @batch. Please my comments in
    http://marc.info/?l=linux-kernel&m=130153302319613&w=2

    And the atomic64 approach not just improved the performance (which is
    always welcomed), but it also fixes a bug for 32-bit system. The usage
    of lglock is actually quite straightforward and is standard usage of
    lglock (the comments of lglock.h declare such usage), just lglock
    doesn't work for dynamatically allocated structure currently, which
    needs a convert.

    Thanks,
    Shaohua



    \
     
     \ /
      Last update: 2011-05-12 04:51    [W:0.025 / U:90.232 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site