[lkml]   [2012]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Kswapd in 3.2.0-rc5 is a CPU hog
    On 12/26/2011 10:57 PM, Minchan Kim wrote:

    > I guess it's caused by small NORMAL zone.
    > The scenario I think is as follows,

    I guess it is exaggerated by a small NORMAL zone. Even on my
    system, where the NORMAL zone is about 3x as large as the DMA32
    zone, I can see that the pages in the NORMAL zone get recycled
    slightly faster than those in the DMA32 zone...

    > 1. dd comsumes memory in NORMAL zone
    > 2. dd enter direct reclaim and wakeup kswapd
    > 3. kswapd reclaims some memory in NORMAL zone until it reclaims high wamrk
    > 4. schedule
    > 5. dd consumes memory again in NORMAL zone
    > 6. kswapd fail to reclaim memory by high watermark due to 5.
    > 7. loop again, goto 3.
    > The point is speed between reclaim VS memory consumption.
    > So kswapd cannot reach a point which enough pages are in NORMAL zone.

    I wonder if it would make sense for kswapd to count how many
    pages it needs to free in each zone (at step 2), and then stop
    reclaiming once it has freed that many pages.

    That could leave the NORMAL (or HIGHMEM, on 32 bit) zone below
    the watermark, but as long as the other zones are still good,
    allocations can proceed just fine.

    It would have the disadvantage of kswapd stopping reclaim with
    possibly a zone below the watermark, but the advantage of
    better balancing of allocations between zones.

    Does this idea make sense?

    All rights reversed

     \ /
      Last update: 2012-01-11 02:21    [W:0.043 / U:13.560 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site