kernel_optimize_test/Documentation
Tejun Heo 1663f26df3 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.

[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>
2017-02-22 16:41:27 -08:00
..
ABI staging/iio driver patches for 4.11-rc1 2017-02-22 12:14:01 -08:00
accounting
acpi ACPI / button: Remove lid_init_state=method mode 2017-01-31 17:20:45 +01:00
admin-guide slub: make sysfs directories for memcg sub-caches optional 2017-02-22 16:41:27 -08:00
aoe
arm ARM: SoC platform updates for v4.10 2016-12-15 15:39:02 -08:00
arm64 arm64: Work around Falkor erratum 1003 2017-02-10 11:22:12 +00:00
auxdisplay
backlight
blackfin
block block: fix up io_poll documentation 2017-01-03 16:47:13 -07:00
blockdev
bus-devices
cdrom cdrom: Make device operations read-only 2017-02-14 08:29:56 -07:00
cgroup-v1
cma
connector
console
core-api core-api: remove an unexpected unident 2016-12-01 10:46:01 -07:00
cpu-freq cpufreq: intel_pstate: Operation mode control from sysfs 2017-02-04 00:05:31 +01:00
cpuidle
cris
crypto This pull contains one set of changes: a conversion of the crypto DocBook 2016-12-17 16:00:34 -08:00
dev-tools Documentation/sparse: drop __CHECK_ENDIAN__ 2016-12-16 00:13:41 +02:00
device-mapper dm cache metadata: add "metadata2" feature 2017-02-16 13:12:47 -05:00
devicetree TTY/Serial driver patches for 4.11-rc1 2017-02-22 12:17:25 -08:00
dmaengine dmaengine: Documentation: Fix typo in pxa_dma.txt 2016-11-14 08:14:24 +05:30
doc-guide docs-rst: parse-headers.pl: cleanup the documentation 2016-11-30 17:08:09 -07:00
DocBook char/misc driver patches for 4.11-rc1 2017-02-22 11:38:22 -08:00
driver-api driver core patches for 4.11-rc1 2017-02-22 11:44:32 -08:00
driver-model irqdesc: Add a resource managed version of irq_alloc_descs() 2017-02-10 14:39:20 +01:00
early-userspace
EDID
extcon extcon: int3496: Add Intel INT3496 ACPI device extcon driver 2017-01-09 10:04:11 +09:00
fault-injection
fb
features 2nd round of ARC udpates for 4.10rc1 2016-12-23 10:22:47 -08:00
filesystems rxrpc: Change module filename to rxrpc.ko 2017-02-17 15:09:19 -05:00
firmware_class firmware: revamp firmware documentation 2017-01-11 09:42:59 +01:00
fmc
fpga fpga: Add scatterlist based programming 2017-02-10 15:20:44 +01:00
frv
gpio pinctrl / gpio: Introduce .set_config() callback for GPIO chips 2017-01-26 15:27:37 +01:00
gpu Main pull request for drm for 4.10 kernel 2016-12-13 09:35:09 -08:00
hid
hwmon hwmon: Update documentation to clarify rules for the 'name' attribute 2017-01-25 06:14:36 -08:00
i2c Merge branch 'i2c/for-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2016-12-15 12:56:35 -08:00
ia64
ide
iio
infiniband
input
ioctl
isdn
kbuild Kconfig: Introduce the "imply" keyword 2016-11-16 09:26:33 +01:00
kdump
laptops platform/x86: thinkpad_acpi: Add support for X1 Yoga (2016) Tablet Mode 2016-12-13 09:29:06 -08:00
leds leds: class: Add new optional brightness_hw_changed attribute 2017-01-29 19:59:42 +01:00
livepatch livepatch: doc: remove the limitation for schedule() patching 2017-01-11 02:33:39 +01:00
locking locking/ww_mutex/Documentation: Update the design document 2017-01-14 11:14:55 +01:00
m68k
media media updates for v4.11-rc1 2017-02-21 16:58:32 -08:00
memory-devices
metag
mic
mips
misc-devices
mmc
mn10300
mtd spi-nor: Add support for Intel SPI serial flash controller 2017-01-03 17:33:36 +00:00
namespaces
netlabel
networking GTP: Add some basic documentation about drivers/net/gtp.c 2017-02-20 10:24:20 -05:00
nfc
nios2
nvdimm
nvmem
parisc
PCI
pcmcia
perf perf: add qcom l2 cache perf events driver 2017-02-08 19:32:24 +00:00
phy
platform
power Merge branch 'pm-sleep' 2017-02-20 14:26:13 +01:00
powerpc
pps
prctl
process Doc: Correct typo, "Introdution" => "Introduction" 2016-12-01 10:44:08 -07:00
pti
ptp
rapidio
RCU Merge branches 'doc.2017.01.15b', 'dyntick.2017.01.23a', 'fixes.2017.01.23a', 'srcu.2017.01.25a' and 'torture.2017.01.15b' into HEAD 2017-01-25 12:56:05 -08:00
s390
scheduler sched/Documentation/sched-rt-group: Fix incorrect example 2017-01-22 10:34:17 +01:00
scsi Merge branch 'misc' into for-linus 2016-12-22 12:32:33 -08:00
security This renames the (now inaccurate) CONFIG_DEBUG_RODATA and related config 2017-02-21 17:56:45 -08:00
serial
sh
sound Merge remote-tracking branch 'sound/topic/restize-docs' into sound 2016-11-18 16:19:28 -07:00
sphinx docs: sphinx-extensions: make rstFlatTable work with docutils 0.13 2016-12-18 13:30:29 -07:00
sphinx-static
spi spi: spi-ep93xx: simplify GPIO chip selects 2017-02-16 20:10:26 +00:00
sysctl bpf: make jited programs visible in traces 2017-02-17 13:40:05 -05:00
target
thermal
timers time: Remove CONFIG_TIMER_STATS 2017-02-10 11:15:08 +01:00
trace This release has a few updates: 2016-12-15 13:49:34 -08:00
translations Documentation/sparse: drop __CHECK_ENDIAN__ 2016-12-16 00:13:41 +02:00
usb usb: gadget: uac2: add req_number as parameter 2017-01-24 11:04:21 +02:00
virtual KVM: PPC: Book3S HV: Add userspace interfaces for POWER9 MMU 2017-01-31 19:11:47 +11:00
vm mm: add documentation for page fragment APIs 2017-01-10 18:31:55 -08:00
w1
watchdog
wimax
x86 efi: Get and store the secure boot status 2017-02-07 10:42:10 +01:00
xtensa
.gitignore
00-INDEX edac: adjust docs location at MAINTAINERS and 00-INDEX 2016-12-15 08:57:16 -02:00
bcache.txt
bt8xxgpio.txt
btmrvl.txt
bus-virt-phys-mapping.txt
cachetlb.txt
cgroup-v2.txt
Changes docs: add back 'Documentation/Changes' file (as symlink) 2016-12-14 16:30:12 -08:00
circular-buffers.txt Documentation: circular-buffers: use READ_ONCE() 2016-11-16 16:17:45 -07:00
clk.txt
CodingStyle
conf.py docs-rst: doc-guide: split the kernel-documentation.rst contents 2016-11-19 10:22:04 -07:00
cpu-hotplug.txt
cpu-load.txt
cputopology.txt
crc32.txt
dcdbas.txt
debugging-modules.txt
debugging-via-ohci1394.txt
dell_rbu.txt
digsig.txt
DMA-API-HOWTO.txt
DMA-API.txt
DMA-attributes.txt common: DMA-mapping: add DMA_ATTR_PRIVILEGED attribute 2017-01-19 15:56:19 +00:00
dma-buf-sharing.txt
DMA-ISA-LPC.txt
docutils.conf
dontdiff Remove last traces of ikconfig.h 2016-12-14 10:54:28 +01:00
efi-stub.txt
eisa.txt
flexible-arrays.txt
futex-requeue-pi.txt
gcc-plugins.txt
highuid.txt
hw_random.txt
hwspinlock.txt
index.rst crypto: doc - convert crypto API documentation to Sphinx 2016-12-13 16:37:54 -07:00
intel_txt.txt
Intel-IOMMU.txt
io_ordering.txt
io-mapping.txt
iostats.txt
IPMI.txt ipmi: Update documentation 2016-11-07 12:16:06 -06:00
IRQ-affinity.txt
IRQ-domain.txt
IRQ.txt
irqflags-tracing.txt
isa.txt
isapnp.txt
kernel-doc-nano-HOWTO.txt docs-rst: doc-guide: split the kernel-documentation.rst contents 2016-11-19 10:22:04 -07:00
kernel-per-CPU-kthreads.txt
kobject.txt
kprobes.txt
kref.txt
kselftest.txt Doc: update kselftest.txt with details on how to run tests after install 2016-11-07 18:04:18 -07:00
ldm.txt
lockup-watchdogs.txt
logo.gif
logo.txt
lzo.txt
mailbox.txt
Makefile
Makefile.sphinx docs-rst: fix media cleandocs target 2016-11-30 17:08:03 -07:00
md-cluster.txt
memory-barriers.txt doc: Update control-dependencies section of memory-barriers.txt 2017-01-14 21:29:15 -08:00
memory-hotplug.txt
men-chameleon-bus.txt
nommu-mmap.txt
ntb.txt
numastat.txt
padata.txt
parport-lowlevel.txt
percpu-rw-semaphore.txt
phy.txt
pi-futex.txt
pinctrl.txt pinctrl: core: Fix regression caused by delayed work for hogs 2017-01-13 16:25:17 +01:00
pnp.txt
preempt-locking.txt
printk-formats.txt
pwm.txt
rbtree.txt
remoteproc.txt
rfkill.txt
robust-futex-ABI.txt
robust-futexes.txt
rpmsg.txt
rtc.txt
SAK.txt
sgi-ioc4.txt
siphash.txt siphash: implement HalfSipHash1-3 for hash tables 2017-01-09 13:58:57 -05:00
SM501.txt
smsc_ece1099.txt
static-keys.txt
SubmittingPatches
svga.txt
sync_file.txt
this_cpu_ops.txt
unaligned-memory-access.txt Documentation/unaligned-memory-access.txt: fix incorrect comparison operator 2016-12-27 13:08:42 -07:00
unshare.txt
vfio-mediated-device.txt vfio-mdev: Make mdev_parent private 2016-12-30 08:13:41 -07:00
vfio.txt
video-output.txt
xillybus.txt
xz.txt
zorro.txt