linux/tools/testing/selftests
Roman Gushchin 933dc80ec2 kselftests: cgroup: add kernel memory accounting tests
Add some tests to cover the kernel memory accounting functionality.  These
are covering some issues (and changes) we had recently.

1) A test which allocates a lot of negative dentries, checks memcg slab
   statistics, creates memory pressure by setting memory.max to some low
   value and checks that some number of slabs was reclaimed.

2) A test which covers side effects of memcg destruction: it creates
   and destroys a large number of sub-cgroups, each containing a
   multi-threaded workload which allocates and releases some kernel
   memory.  Then it checks that the charge ans memory.stats do add up on
   the parent level.

3) A test which reads /proc/kpagecgroup and implicitly checks that it
   doesn't crash the system.

4) A test which spawns a large number of threads and checks that the
   kernel stacks accounting works as expected.

5) A test which checks that living charged slab objects are not
   preventing the memory cgroup from being released after being deleted by
   a user.

Signed-off-by: Roman Gushchin <guro@fb.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Christoph Lameter <cl@linux.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Shakeel Butt <shakeelb@google.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Link: http://lkml.kernel.org/r/20200623174037.3951353-19-guro@fb.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-08-07 11:33:25 -07:00
..
android
arm64 kselftest: arm64: Remove redundant clean target 2020-06-24 14:25:59 +01:00
bpf Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2020-08-03 18:27:40 -07:00
breakpoints selftests: breakpoints: do not use ksft_exit_skip after ksft_set_plan 2020-07-06 15:47:48 -06:00
capabilities
cgroup kselftests: cgroup: add kernel memory accounting tests 2020-08-07 11:33:25 -07:00
clone3 linux-kselftest-5.9-rc1 2020-08-05 10:28:25 -07:00
core tests: add CLOSE_RANGE_UNSHARE tests 2020-06-17 00:07:38 +02:00
cpu-hotplug
cpufreq
dmabuf-heaps
drivers selftests: mlxsw: RED: Test offload of trapping on RED qevents 2020-08-03 18:06:46 -07:00
efivarfs
exec linux-kselftest-5.8-rc1 2020-06-09 10:03:12 -07:00
filesystems selftests/binderfs: Fix harness API usage 2020-07-06 15:59:16 -06:00
firmware selftest/firmware: Add selftest timeout in settings 2020-07-25 12:05:20 +02:00
fpu selftests/fpu: Add an FPU selftest 2020-06-29 10:02:23 +02:00
ftrace selftests/ftrace: Support ":README" suffix for requires 2020-06-16 10:42:47 -06:00
futex
gpio
ia64
intel_pstate
ipc
ir
kcmp
kexec
kmod selftests: kmod: Add module address visibility test 2020-07-17 13:36:51 -06:00
kselftest Driver core changes for 5.9-rc1 2020-08-05 11:52:17 -07:00
kvm KVM: nVMX: check for invalid hdr.vmx.flags 2020-07-27 09:04:50 -04:00
lib lib: make a test module with set/clear bit 2020-06-04 19:06:25 -07:00
livepatch selftests/livepatch: adopt to newer sysctl error format 2020-07-15 08:54:35 +02:00
lkdtm lkdtm: Make arch-specific tests always available 2020-06-29 18:41:39 +02:00
locking
media_tests
membarrier
memfd
memory-hotplug
mount
mqueue
net selftests/net: relax cpu affinity requirement in msg_zerocopy test 2020-08-05 12:25:35 -07:00
netfilter selftests: netfilter: add meta iif/oif match test 2020-08-03 12:02:22 +02:00
nsfs
ntb NTB: ntb_test: Fix bug when counting remote files 2020-06-05 20:02:09 -04:00
openat2
pid_namespace selftests: Remove unneeded selftest API headers 2020-07-06 15:59:07 -06:00
pidfd linux-kselftest-5.9-rc1 2020-08-05 10:28:25 -07:00
powerpc selftests/powerpc: Use proper error code to check fault address 2020-07-15 23:10:17 +10:00
prctl
proc
pstore pstore/platform: Use backend name for console registration 2020-05-30 10:34:02 -07:00
ptp testptp: add new options for perout phase and pulse width 2020-07-20 18:04:59 -07:00
ptrace
rcutorture Merge branches 'doc.2020.06.29a', 'fixes.2020.06.29a', 'kfree_rcu.2020.06.29a', 'rcu-tasks.2020.06.29a', 'scale.2020.06.29a', 'srcu.2020.06.29a' and 'torture.2020.06.29a' into HEAD 2020-06-29 12:03:15 -07:00
resctrl
rseq
rtc
safesetid
seccomp arch/csky patches for 5.9-rc1 2020-08-06 10:15:28 -07:00
sigaltstack selftests: sigaltstack: do not use ksft_exit_skip after ksft_set_plan 2020-07-06 15:57:15 -06:00
size
sparc64
splice
static_keys
sync selftests: sync_test: do not use ksft_exit_skip after ksft_set_plan 2020-07-06 15:57:28 -06:00
sysctl linux-kselftest-5.8-rc1 2020-06-09 10:03:12 -07:00
tc-testing tc-testing: Add tdc to kselftests 2020-07-20 18:29:37 -07:00
timens
timers
tmpfs
tpm2 selftests: tpm: upgrade TPM2 tests from Python 2 to Python 3 2020-07-06 14:20:35 -06:00
uevent selftests: Remove unneeded selftest API headers 2020-07-06 15:59:07 -06:00
user
vDSO
vm hmm related patches for 5.9 2020-08-05 13:28:50 -07:00
watchdog
wireguard wireguard: device: avoid circular netns references 2020-06-23 14:50:34 -07:00
x86 Support for FSGSBASE. Almost 5 years after the first RFC to support it, 2020-08-04 21:16:22 -07:00
zram
.gitignore
gen_kselftest_tar.sh
kselftest_deps.sh
kselftest_harness.h selftests/harness: Limit step counter reporting 2020-07-17 13:56:35 -06:00
kselftest_install.sh
kselftest_module.h
kselftest.h linux-kselftest-5.9-rc1 2020-08-05 10:28:25 -07:00
lib.mk selftests: fix condition in run_tests 2020-07-07 14:11:31 -06:00
Makefile Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-08-05 20:13:21 -07:00