[LTP] [PATCH v3 2/2] memcontrol04: Copy from kselftest
Li Wang
liwang@redhat.com
Tue Mar 1 04:55:35 CET 2022
Richard Palethorpe <rpalethorpe@suse.com> wrote:
+// SPDX-License-Identifier: GPL-2.0
> +/*\
> + *
> + * [Description]
> + *
> + * Conversion of the forth kself test in cgroup/test_memcontrol.c.
> + *
> + * Original description:
> + * "First, this test creates the following hierarchy:
> + * A memory.low = 50M, memory.max = 200M
> + * A/B memory.low = 50M, memory.current = 50M
> + * A/B/C memory.low = 75M, memory.current = 50M
> + * A/B/D memory.low = 25M, memory.current = 50M
> + * A/B/E memory.low = 500M, memory.current = 0
> + * A/B/F memory.low = 0, memory.current = 50M
> + *
> + * Usages are pagecache
> + * Then it creates A/G and creates a significant
> + * memory pressure in it.
> + *
> + * A/B memory.current ~= 50M
> + * A/B/C memory.current ~= 33M
> + * A/B/D memory.current ~= 17M
> + * A/B/E memory.current ~= 0
> + *
> + * After that it tries to allocate more than there is unprotected
> + * memory in A available, and checks that memory.low protects
> + * pagecache even in this case."
>
This is not exactly the original description of memory.low test,
it looks like modified from memory.min part.
Maybe we'd better copy from line#398~#418.
https://github.com/torvalds/linux/blob/master/tools/testing/selftests/cgroup/test_memcontrol.c#L398
--
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20220301/0d2a1e1f/attachment.htm>
More information about the ltp
mailing list