[LTP] [PATCH 1/4] controllers/memcg: update stress test to work under cgroup2
Li Wang
liwang@redhat.com
Wed Dec 1 10:13:13 CET 2021
Hi Luke,
Thanks for looking into this.
On Sat, Nov 27, 2021 at 8:05 AM Luke Nowakowski-Krijger <
luke.nowakowskikrijger@canonical.com> wrote:
> Update tests to be able to work when memory controller is mounted under
> cgroup2 hierarchy.
>
I'm thinking whether we could achieve these setup functions
more generic in cgroup_lib.sh, which to avoid the redundancy
behavior over and over again in each cgroup sub-test.
About the compatibility of cgroup V1 and V2 in test, I'd suggest
following what the LTP C library did in include/tst_cgroup.h.
https://github.com/linux-test-project/ltp/blob/master/doc/c-test-api.txt#L2024
The solution may be briefly as:
1. scan system mounted CGroup path, and judge the situation as one of
below:
* only CGroup V2 mounted
* only CGroup V1 mounted
* both CGroup V2 and V1 mounted
* no CGroup mounted
2. make use of the system mounted CGroup V2 or TSKIP
* goto step 5
3. make use of the system mounted CGroup V1
* goto step 5
4. do mount Cgroup as what we needed (V1 or V2) in test
* goto step 5
5. do cleanup
What do you think?
--
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20211201/4e1e07df/attachment.htm>
More information about the ltp
mailing list