Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mm/vmscan.c: iterate only over charged shrinkers during memcg shrink_…
…slab() Using the preparations made in previous patches, in case of memcg shrink, we may avoid shrinkers, which are not set in memcg's shrinkers bitmap. To do that, we separate iterations over memcg-aware and !memcg-aware shrinkers, and memcg-aware shrinkers are chosen via for_each_set_bit() from the bitmap. In case of big nodes, having many isolated environments, this gives significant performance growth. See next patches for the details. Note that the patch does not respect to empty memcg shrinkers, since we never clear the bitmap bits after we set it once. Their shrinkers will be called again, with no shrinked objects as result. This functionality is provided by next patches. [[email protected]: v9] Link: http://lkml.kernel.org/r/153112558507.4097.12713813335683345488.stgit@localhost.localdomain Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Kirill Tkhai <[email protected]> Acked-by: Vladimir Davydov <[email protected]> Tested-by: Shakeel Butt <[email protected]> Cc: Al Viro <[email protected]> Cc: Andrey Ryabinin <[email protected]> Cc: Chris Wilson <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Guenter Roeck <[email protected]> Cc: "Huang, Ying" <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Josef Bacik <[email protected]> Cc: Li RongQing <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Matthias Kaehlcke <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Minchan Kim <[email protected]> Cc: Philippe Ombredanne <[email protected]> Cc: Roman Gushchin <[email protected]> Cc: Sahitya Tummala <[email protected]> Cc: Stephen Rothwell <[email protected]> Cc: Tetsuo Handa <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Waiman Long <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information