]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
mm: memcontrol: drain memcg stock on force_empty
authorJunaid Shahid <junaids@google.com>
Fri, 8 Jun 2018 00:07:31 +0000 (17:07 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 8 Jun 2018 00:34:36 +0000 (17:34 -0700)
commitd12c60f64cf8c768fddfd848eaf7ee57a13f18b1
treea85f422f1f49ede486955d820b9023ac90fa5dfe
parentbb4a7ea2b1449722cec9d787dca5a74ca36e8eeb
mm: memcontrol: drain memcg stock on force_empty

The per-cpu memcg stock can retain a charge of upto 32 pages.  On a
machine with large number of cpus, this can amount to a decent amount of
memory.  Additionally force_empty interface might be triggering unneeded
memcg reclaims.

Link: http://lkml.kernel.org/r/20180507201651.165879-1-shakeelb@google.com
Signed-off-by: Junaid Shahid <junaids@google.com>
Signed-off-by: Shakeel Butt <shakeelb@google.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Greg Thelen <gthelen@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memcontrol.c