• KAMEZAWA Hiroyuki's avatar
    memcg: helper function for relcaim from shmem. · c9b0ed51
    KAMEZAWA Hiroyuki authored
    A new call, mem_cgroup_shrink_usage() is added for shmem handling and
    relacing non-standard usage of mem_cgroup_charge/uncharge.
    
    Now, shmem calls mem_cgroup_charge() just for reclaim some pages from
    mem_cgroup.  In general, shmem is used by some process group and not for
    global resource (like file caches).  So, it's reasonable to reclaim pages
    from mem_cgroup where shmem is mainly used.
    
    [hugh@veritas.com: shmem_getpage release page sooner]
    [hugh@veritas.com: mem_cgroup_shrink_usage css_put]
    Signed-off-by: default avatarKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
    Cc: Balbir Singh <balbir@in.ibm.com>
    Cc: "Eric W. Biederman" <ebiederm@xmission.com>
    Cc: Pavel Emelyanov <xemul@openvz.org>
    Cc: Li Zefan <lizf@cn.fujitsu.com>
    Cc: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
    Cc: Paul Menage <menage@google.com>
    Cc: David Rientjes <rientjes@google.com>
    Signed-off-by: default avatarHugh Dickins <hugh@veritas.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    c9b0ed51
shmem.c 66.2 KB