[lkml]   [2009]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [RFC][PATCH] lib: generic percpu counter array
    On Thu, 5 Nov 2009, KAMEZAWA Hiroyuki wrote:

    > Anothter major percpu coutner is vm_stat[]. This patch implements
    > vm_stat[] style counter array in lib/percpu_counter.c
    > This is designed for introducing vm_stat[] style counter to memcg,
    > but maybe useful for other people. By using this, counter array
    > using percpu can be implemented easily in compact structure.

    Note that vm_stat support was written that way because we have extreme
    space constraints due to the need to keep statistics per zone and per cpu
    and avoid cache line pressure that would result through the use of big
    integer arrays per zone and per cpu. For a large number of zones and cpus
    this is desastrous.

    If you only need to keep statistics per cpu for an entity then the vmstat
    approach is overkill. A per cpu allocation of a counter is enough.

     \ /
      Last update: 2009-11-05 21:07    [W:0.026 / U:1.336 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site