[PATCH v2 21/28] vmscan: also shrink slab in memcg pressure

Glauber Costa glommer at parallels.com
Wed Apr 3 10:43:53 UTC 2013


On 04/03/2013 02:11 PM, Sha Zhengju wrote:
>> > +unsigned long
>> > +memcg_zone_reclaimable_pages(struct mem_cgroup *memcg, struct zone *zone)
>> > +{
>> > +       int nid = zone_to_nid(zone);
>> > +       int zid = zone_idx(zone);
>> > +       unsigned long val;
>> > +
>> > +       val = mem_cgroup_zone_nr_lru_pages(memcg, nid, zid, LRU_ALL_FILE);
>> > +       if (do_swap_account)
> IMHO May get_nr_swap_pages() be more appropriate here?
> 

This is a per-memcg number, how would get_nr_swap_pages() help us here?



More information about the Containers mailing list