android_kernel_sony_sdm845/init
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Tejun Heo a4ffb67e42 BACKPORT: slub: make sysfs directories for memcg sub-caches optional
SLUB creates a per-cache directory under /sys/kernel/slab which hosts a
bunch of debug files.  Usually, there aren't that many caches on a
system and this doesn't really matter; however, if memcg is in use, each
cache can have per-cgroup sub-caches.  SLUB creates the same directories
for these sub-caches under /sys/kernel/slab/$CACHE/cgroup.

Unfortunately, because there can be a lot of cgroups, active or
draining, the product of the numbers of caches, cgroups and files in
each directory can reach a very high number - hundreds of thousands is
commonplace.  Millions and beyond aren't difficult to reach either.

What's under /sys/kernel/slab is primarily for debugging and the
information and control on the a root cache already cover its
sub-caches.  While having a separate directory for each sub-cache can be
helpful for development, it doesn't make much sense to pay this amount
of overhead by default.

This patch introduces a boot parameter slub_memcg_sysfs which determines
whether to create sysfs directories for per-memcg sub-caches.  It also
adds CONFIG_SLUB_MEMCG_SYSFS_ON which determines the boot parameter's
default value and defaults to 0.

(cherry picked from commit 1663f26df3df7df3720306ca67f5ea8296d68fa1)
[akpm@linux-foundation.org: kset_unregister(NULL) is legal]
Link: http://lkml.kernel.org/r/20170204145203.GB26958@mtj.duckdns.org
Signed-off-by: Tejun Heo <tj@kernel.org>
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: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Bug: 113130132
Change-Id: I36b3b65ad583527c57518aa9f73a97ebd68d01b2
Signed-off-by: Minchan Kim <minchan@google.com>
2018-08-24 10:10:18 +00:00
..
calibrate.c kernel: add calibration_delay_done() 2014-06-16 12:47:39 -06:00
do_mounts.c CHROMIUM: dm: boot time specification of dm= 2017-01-27 13:55:15 -08:00
do_mounts.h CHROMIUM: dm: boot time specification of dm= 2017-01-27 13:55:15 -08:00
do_mounts_dm.c ANDROID: Update init/do_mounts_dm.c to the latest ChromiumOS version. 2017-06-05 11:26:17 -04:00
do_mounts_initrd.c init/do_mounts: initrd_load() can be boolean 2016-01-20 17:09:18 -08:00
do_mounts_md.c init: disable sparse checking of the mount.o source files 2012-05-31 17:49:27 -07:00
do_mounts_rd.c init: use pr_cont() when displaying rotator during ramdisk loading. 2016-11-24 09:32:20 -08:00
init_task.c sched/core: Allow putting thread_info into task_struct 2016-09-15 08:25:13 +02:00
initramfs.c ANDROID: initramfs: call free_initrd() when skipping init 2017-12-05 18:05:48 +00:00
Kconfig BACKPORT: slub: make sysfs directories for memcg sub-caches optional 2018-08-24 10:10:18 +00:00
main.c init: rename and re-order boot_cpu_state_init() 2018-08-15 18:14:42 +02:00
Makefile CHROMIUM: dm: boot time specification of dm= 2017-01-27 13:55:15 -08:00
noinitramfs.c ANDROID: initramfs: Add skip_initramfs command line option 2017-01-27 13:52:19 -08:00
version.c copy address of proc_ns_ops into ns_common 2014-12-04 14:34:47 -05:00