[lkml]   [2009]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] vmscan: memcg needs may_swap (Re: [patch] vmscan: rename sc.may_swap to may_unmap)
    > memory cgroup has 2 calls to this shrink_zone.
    > 1. memory usage hits the limit.
    > 2. mem+swap usage hits the limit.
    > At "2", swap-out doesn't decrease the usage of mem+swap, then set may_swap=0.
    > So, we want to kick out only file caches.
    > But, we can reclaim file cache and "unmap file cache and reclaim it!" is
    > necessary even if may_swap=0.
    > Then, scanning only FILE LRU makes sense at may_swap=0 *if* memcg is
    > the only user of may_swap=0.
    > Let's see others.
    > - __zone_reclaim sets may_unmap to be 0 when they don't want swap-out.
    > .....can be replaced with may_swap.
    > - shrink_all_memory sets may_swap to be 0. Is this called by hibernation ?
    > If you don't want to unmap file caches while hibernation, adding may_unmap
    > as *new* paramter makes sense, I think.
    > The change you proposed is for dropping unused SwapCache pages. Right ?
    > But this will be dropped by kswapd if necessary.
    > As far as memcg concerns, scanning ANON LRU even when may_swap=0 is just
    > a waste of cpu time.

    this sentence just explain my intention.

    1. memcg, zone_reclaim scanning ANON LRU is just waste of cpu.
    2. kswapd and normal direct reclaim can reclaim stealed swapcache anyway.
    then above trick don't cause any system hang-up and performance degression.

     \ /
      Last update: 2009-04-01 11:15    [W:0.021 / U:4.072 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site