lkml.org 
[lkml]   [2010]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[UnifiedV4 13/16] vmscan: Tie slub object expiration into page reclaim
    We already do slab reclaim during page reclaim. Add a call to
    object expiration in slub whenever shrink_slab() is called.
    If the reclaim is zone specific then use the node of the zone
    to restrict reclaim in slub.

    Signed-off-by: Christoph Lameter <cl@linux.com>


    ---
    mm/vmscan.c | 4 ++++
    1 file changed, 4 insertions(+)

    Index: linux-2.6/mm/vmscan.c
    ===================================================================
    --- linux-2.6.orig/mm/vmscan.c 2010-10-04 08:14:25.000000000 -0500
    +++ linux-2.6/mm/vmscan.c 2010-10-04 08:26:47.000000000 -0500
    @@ -1917,6 +1917,7 @@ static unsigned long do_try_to_free_page
    sc->nr_reclaimed += reclaim_state->reclaimed_slab;
    reclaim_state->reclaimed_slab = 0;
    }
    + kmem_cache_expire_all(NUMA_NO_NODE);
    }
    total_scanned += sc->nr_scanned;
    if (sc->nr_reclaimed >= sc->nr_to_reclaim)
    @@ -2221,6 +2222,7 @@ loop_again:
    reclaim_state->reclaimed_slab = 0;
    nr_slab = shrink_slab(sc.nr_scanned, GFP_KERNEL,
    lru_pages);
    + kmem_cache_expire_all(zone_to_nid(zone));
    sc.nr_reclaimed += reclaim_state->reclaimed_slab;
    total_scanned += sc.nr_scanned;
    if (zone->all_unreclaimable)
    @@ -2722,6 +2724,8 @@ static int __zone_reclaim(struct zone *z
    break;
    }

    + kmem_cache_expire_all(zone_to_nid(zone));
    +
    /*
    * Update nr_reclaimed by the number of slab pages we
    * reclaimed from this zone.


    \
     
     \ /
      Last update: 2010-10-05 21:01    [W:0.021 / U:122.596 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site