lkml.org 
[lkml]   [2011]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCHSET] block, mempool, percpu: implement percpu mempool and fix blkcg percpu alloc deadlock
    On Thu, 22 Dec 2011 13:45:19 -0800
    Tejun Heo <tj@kernel.org> wrote:

    > This patchset implements mempool for percpu memory and use it to solve
    > allocation deadlock problem in block cgroup paths. Percpu memory
    > allocator can't be called from memory reclaim path, mostly because its
    > on-demand chunk filling hooks into vmalloc area management, which in
    > turn hooks into arch pagetable code.
    >
    > This usually isn't a problem but block cgroup code wants to do
    > opportunistic percpu allocation to track statistics in IO issue path.
    > Currently, it directly calls alloc_percpu() from IO path triggering
    > lockdep warning and falling into deadlocks under the right conditions.
    >
    > This patchset adds percpu mempool which supports async refilling and
    > uses that as allocation buffer to solve the above problem. It solves
    > the problem for the next merge window but I'm not sure about what to
    > do about this window and -stable. The mempool updates seems a bit too
    > invasive. Maybe implement a stripped down allocation buffer in
    > block-cgroup?

    This is taking the kernel in exactly the wrong direction. More code,
    more complexity. Let's think of an alternative which takes us in the
    right direction.


    How about we just delete those statistics and then this patchset?

    Or how about we change those statistics to not do percpu allocations,
    then delete this patchset?

    Or how about we fix the percpu memory allocation code so that it
    propagates the gfp flags, then delete this patchset?


    All of those things would simplify and/or improve the kernel. Whereas
    this patchset complicates the kernel while working around known
    shortcomings.




    \
     
     \ /
      Last update: 2011-12-22 23:01    [W:2.449 / U:0.208 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site