lkml.org 
[lkml]   [2010]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH] mm/nommu.c:Dynamic alloc/free percpu area for nommu
    From
    On Thu, Apr 8, 2010 at 10:43 AM, Tejun Heo <tj@kernel.org> wrote:
    > Hello, Sonic.
    >
    >> I tested your patch on NOMMU bf561 with SMP enabled. It is compiled
    >> and boots without problem. Because there are few percpu data defined
    >> in bf561 SMP kernel, the functions in mm/percpu-km.c may not be
    >> executed with a simple test. But, since these functions are simple
    >> malloc/free, I don't see any problem.
    >
    > Great, thanks for testing.  Just in case, can you please test with the
    > attached module?  In test-pcpu.c, the cmds table directs the module
    > what to allocate and free.  { size > 0, tag } entry makes it allocate
    > an area with the specified size and tag and { 0, tag } entry makes it
    > free all areas with the matching tag.  The existing table makes pretty
    > large amount of allocations and might not work very well on nommu
    > configuration.  There are also several DEFINE_PER_CPU() instances to
    > test module static percpu area alloc/free.  Please insmod/rmmod in
    > loop and make sure it doesn't leak any memory or crashes the machine.
    >

    Tejun,

    There is memory leak with you patch. Free memory continuously
    decreases when running test_pcpu. After about 30 minutes, kernel hangs
    in out_of_memory().


    root/> while [ 1 ]; do modprobe test_pcpu; rmmod test_pcpu; cat
    proc/meminfo; done


    Sonic

    > Thanks.
    >
    > --
    > tejun
    >
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2010-04-08 11:43    [W:0.020 / U:1.384 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site