Skip to content
  • Vladimir Davydov's avatar
    fs: make shrinker memcg aware · 2acb60a0
    Vladimir Davydov authored
    
    
    Now, to make any list_lru-based shrinker memcg aware we should only
    initialize its list_lru as memcg aware.  Let's do it for the general FS
    shrinker (super_block::s_shrink).
    
    There are other FS-specific shrinkers that use list_lru for storing
    objects, such as XFS and GFS2 dquot cache shrinkers, but since they
    reclaim objects that are shared among different cgroups, there is no point
    making them memcg aware.  It's a big question whether we should account
    them to memcg at all.
    
    Signed-off-by: default avatarVladimir Davydov <vdavydov@parallels.com>
    Cc: Dave Chinner <david@fromorbit.com>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Michal Hocko <mhocko@suse.cz>
    Cc: Greg Thelen <gthelen@google.com>
    Cc: Glauber Costa <glommer@gmail.com>
    Cc: Alexander Viro <viro@zeniv.linux.org.uk>
    Cc: Christoph Lameter <cl@linux.com>
    Cc: Pekka Enberg <penberg@kernel.org>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
    Cc: Tejun Heo <tj@kernel.org>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    2acb60a0