lkml.org 
[lkml]   [2011]   [Dec]   [27]   [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 Tue, 27 Dec 2011 13:44:21 -0800
    Tejun Heo <tj@kernel.org> wrote:

    > I'm not convinced trying to put this into GFP_KERNEL context would
    > work. Short of that, the next best thing would be making percpu
    > allocator useable from memory reclaim path, right?

    Well.. All allocations which are weaker than GFP_KERNEL are to be
    discouraged. That being said...

    > But that would
    > involved a lot more churn and complexity without much added benefit,
    > given that this type of use cases aren't expected to be common - and
    > I'm fairly sure it isn't given track record of past few years.

    I don't think it would be too hard to add an alloc_percpu_gfp(). Add
    the gfp_t to a small number of functions (two or three?) then change
    pcpu_mem_zalloc() to always use kzalloc() if (flags & GFP_KERNEL !=
    GFP_KERNEL). And that's it?

    But the question is: is this a *good* thing to do? It would be nice if
    kernel developers understood that GFP_KERNEL is strongly preferred and
    that they should put in effort to use it. But there's a strong
    tendency for people to get themselves into a sticky corner then take
    the easy way out, resulting in less robust code. Maybe calling the
    function alloc_percpu_i_really_suck() would convey the hint.




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