summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/cgroup/cgroup_util.h
diff options
context:
space:
mode:
authorShakeel Butt <shakeelb@google.com>2022-03-23 00:40:25 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2022-03-23 01:57:02 +0300
commit6323ec54b4504070c1e001242e3e912837b3ae3a (patch)
treeefd2f312bc0de8e021fa1806b21fc9817db695b1 /tools/testing/selftests/cgroup/cgroup_util.h
parent1461e8c2b6af89e9662b5cbb714d7cb80baae3ca (diff)
downloadlinux-6323ec54b4504070c1e001242e3e912837b3ae3a.tar.xz
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. Link: https://lkml.kernel.org/r/20220211064917.2028469-4-shakeelb@google.com Signed-off-by: Shakeel Butt <shakeelb@google.com> Reviewed-by: Roman Gushchin <guro@fb.com> Cc: Roman Gushchin <roman.gushchin@linux.dev> Cc: Chris Down <chris@chrisdown.name> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Michal Hocko <mhocko@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'tools/testing/selftests/cgroup/cgroup_util.h')
-rw-r--r--tools/testing/selftests/cgroup/cgroup_util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/cgroup/cgroup_util.h b/tools/testing/selftests/cgroup/cgroup_util.h
index 4f66d10626d2..628738532ac9 100644
--- a/tools/testing/selftests/cgroup/cgroup_util.h
+++ b/tools/testing/selftests/cgroup/cgroup_util.h
@@ -55,4 +55,5 @@ extern int clone_reap(pid_t pid, int options);
extern 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);