selftests-memcg-test-high-limit-for-single-entry-allocation.patch removed from -mm tree
The patch titled
Subject: selftests: memcg: test high limit for single entry allocation
has been removed from the -mm tree. Its filename was
selftests-memcg-test-high-limit-for-single-entry-allocation.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Shakeel Butt <[email protected]>
Subject: selftests: memcg: test high limit for single entry allocation
Test the enforcement of memory.high limit for large amount of memory allocation within a single kernel entry. There are valid use-cases where the application can trigger large amount of memory allocation within a single syscall e.g. mlock() or mmap(MAP_POPULATE). Make sure memory.high limit enforcement works for such use-cases.
---
tools/testing/selftests/cgroup/cgroup_util.c | 15 ++ tools/testing/selftests/cgroup/cgroup_util.h | 1 tools/testing/selftests/cgroup/test_memcontrol.c | 78 +++++++++++++ 3 files changed, 91 insertions(+), 3 deletions(-)
tools/testing/selftests/cgroup/cgroup_util.c renamed from tools/testing/selftests/cgroup/cgroup_util.c~selftests-memcg-test-high-limit-for-single-entry-allocation +12 -3
@@ -583,7 +583,7 @@ int clone_into_cgroup_run_wait(const chareturn 0 ; } -int cg_prepare_for_wait (const char *cgroup) +static int __prepare_for_wait (const char *cgroup,const char *filename) {int fd, ret =-1 ;
@@ -591,8 +591,7 @@ int cg_prepare_for_wait(const char *cgroif (fd ==-1 )return fd; - ret =inotify_add_watch (fd,cg_control (cgroup,"cgroup.events" ), -IN_MODIFY ); + ret =inotify_add_watch (fd,cg_control (cgroup, filename),IN_MODIFY );if (ret ==-1 ) {close (fd); fd =-1 ;
@@ -601,6 +600,16 @@ int cg_prepare_for_wait(const char *cgroreturn fd; } +int cg_prepare_for_wait (const char *cgroup) +{ +return __prepare_for_wait (cgroup,"cgroup.events" ); +} + +int memcg_prepare_for_wait (const char *cgroup) +{ +return __prepare_for_wait (cgroup,"memory.events" ); +} +int cg_wait_for (int fd) {int ret =-1 ;
tools/testing/selftests/cgroup/cgroup_util.h renamed from tools/testing/selftests/cgroup/cgroup_util.h~selftests-memcg-test-high-limit-for-single-entry-allocation +1 -0
@@ -55,4 +55,5 @@ extern int clone_reap(pid_t pid, int optextern int clone_into_cgroup_run_wait (const char *cgroup);extern int dirfd_open_opath (const char *dir);extern int cg_prepare_for_wait (const char *cgroup); +extern int memcg_prepare_for_wait (const char *cgroup);extern int cg_wait_for (int fd);
tools/testing/selftests/cgroup/test_memcontrol.c renamed from tools/testing/selftests/cgroup/test_memcontrol.c~selftests-memcg-test-high-limit-for-single-entry-allocation +78 -0
96 lines not on this page · raw message
_
Patches currently in -mm which might be from [email protected] are
memcg-sync-flush-only-if-periodic-flush-is-delayed.patch