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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 3, 2013 at 6:43 PM, Glauber Costa <glommer@xxxxxxxxxxxxx> wrote:
> 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?
>

I meant to add get_nr_swap_pages() as the if-judgement, that is:
   if (do_swap_account && get_nr_swap_pages())
       ....
since anon pages becomes unreclaimable if swap space is used up.


Thanks,
Sha
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux