lkml.org 
[lkml]   [2012]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCHSET] mempool, percpu, blkcg: fix percpu stat allocation and remove stats_lock
    On Wed, Mar 07, 2012 at 02:42:29PM -0500, Vivek Goyal wrote:
    > blk-cgroup: Alloc per cpu stats from worker thread in a delayed manner
    >
    > Current per cpu stat allocation assumes GFP_KERNEL allocation flag. But in
    > IO path there are times when we want GFP_NOIO semantics. As there is no
    > way to pass the allocation flags to alloc_percpu(), this patch delays the
    > allocation of stats using a worker thread.
    >
    > v2-> tejun suggested following changes. Changed the patch accordingly.
    > - move alloc_node location in structure
    > - reduce the size of names of some of the fields
    > - Reduce the scope of locking of alloc_list_lock
    > - Simplified stat_alloc_fn() by allocating stats for all
    > policies in one go and then assigning these to a group.
    >
    > v3 -> Andrew suggested to put some comments in the code. Also raised
    > concerns about trying to allocate infinitely in case of allocation
    > failure. I have changed the logic to sleep for 10ms before retrying.
    > That should take care of non-preemptible UP kernels.
    >
    > v4 -> Tejun had more suggestions.
    > - drop list_for_each_entry_all()
    > - instead of msleep() use queue_delayed_work()
    > - Some cleanups realted to more compact coding.
    >
    > v5-> tejun suggested more cleanups leading to more compact code.
    >
    > Signed-off-by: Vivek Goyal <vgoyal@redhat.com>

    Looks good to me. I'll roll it into the stats series. Andrew, if you
    still have objections, please scream.

    Thanks.

    --
    tejun


    \
     
     \ /
      Last update: 2012-03-07 23:59    [W:4.291 / U:0.252 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site