Add memcontrol03 and declarative CG API
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest5 patches 8 repliesIn review
- v25 patches 14 repliesSuperseded
- v16 patches 4 repliesSuperseded
Changes in v3 from the cover letter
* Simplify by adding tst_cgroup.h to tst_test.h as suggested by Li Wang
* rm options defaults as suggested by Li
* use abbreviation for controller, same as version as suggesdted by Li
* rm useless checks for V1 in memcontrol03 as suggested by Cyril
* fix format compile error in cfs_bandwidth01 as reported by Li
* Move the group_name fix into the printf patch; reported by Cyril
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | memcontrol: Lift out some common definitions into a shared headertestcases/ testcases/ | +49 | 0 replies | |
| 2/5 | API/cgroup: Declare required controllers and version in test structdoc/ include/ include/ +17 more | +209 | 4 replies | |
| 3/5 | API/cgroup: Add memory.minlib/ | +1 | 1 reply | |
| 4/5 | API/cgroup: Make tst_cgroup_group_mk sprintf likeinclude/ lib/ testcases/ | +21 | 2 replies | |
| 5/5 | memcontrol03: Copy from kselftestruntest/ testcases/ testcases/ | +255 | 1 reply |
Reviews trailers per patch
All 5 patches have a Reviewed-by or Acked-by.
| Patch | Cyril Hrubis | Li Wang |
|---|---|---|
| 1/5 | R-b | R-b |
| 2/5 | R-b | R-b |
| 3/5 | R-b | R-b |
| 4/5 | R-b | R-b |
| 5/5 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [LTP] [PATCH v3 0/5] Add memcontrol03 and declarative CG API
This adds a third test from the kselftests. Also I have finally taken the step of moving the CGroup configuration to tst_test and making it declarative. Since V2 of the patch this does save a lot of typing and removes the need to remember to call cleanup. It also puts the CGroup info into the metadata.
V3:
* Simplify by adding tst_cgroup.h to tst_test.h as suggested by Li Wang
* rm options defaults as suggested by Li
* use abbreviation for controller, same as version as suggesdted by Li
* rm useless checks for V1 in memcontrol03 as suggested by Cyril
* fix format compile error in cfs_bandwidth01 as reported by Li
* Move the group_name fix into the printf patch; reported by Cyril
V2:
* Updated docs
* Updated library tests
* Moved the test/drain cg ptr out of the test struct and allocate it statically. This resulted in some overly clever init code being removed as well.
* Renamed parent cgs to trunk and child to leaf as technically trunk nodes can be both parents and children.
* Matched the cg names in the comments with the variable names using enums. So it's easier to see that the description matches the code.
* Use waitpid as suggested by Cyril and remove the patch adding tst_reap_child.
* unlink the tmpfile to hopefully prevent random storage full errors when using -i. We already seek to 0.
* init the fd to -1
* Make tst_cgroup_group_mk sprintf like as suggested by Cyril.
Richard Palethorpe (5):
memcontrol: Lift out some common definitions into a shared header API/cgroup: Declare required controllers and version in test struct API/cgroup: Add memory.min
API/cgroup: Make tst_cgroup_group_mk sprintf like
memcontrol03: Copy from kselftest
doc/c-test-api.txt | 102 ++++--- include/tst_cgroup.h | 34 +-- include/tst_test.h | 7 + lib/newlib_tests/tst_cgroup01.c | 3 +- lib/newlib_tests/tst_cgroup02.c | 27 +- lib/tst_cgroup.c | 91 ++++--- lib/tst_test.c | 21 ++ runtest/controllers | 1 + testcases/kernel/controllers/memcg/.gitignore | 1 + .../kernel/controllers/memcg/memcontrol01.c | 20 +- .../kernel/controllers/memcg/memcontrol02.c | 45 +--- .../kernel/controllers/memcg/memcontrol03.c | 253 ++++++++++++++++++ .../controllers/memcg/memcontrol_common.h | 47 ++++ testcases/kernel/mem/cpuset/cpuset01.c | 25 +- testcases/kernel/mem/include/mem.h | 1 - testcases/kernel/mem/ksm/ksm02.c | 19 +- testcases/kernel/mem/ksm/ksm03.c | 13 +- testcases/kernel/mem/ksm/ksm04.c | 16 +- testcases/kernel/mem/oom/oom03.c | 24 +- testcases/kernel/mem/oom/oom04.c | 15 +- testcases/kernel/mem/oom/oom05.c | 34 ++- .../sched/cfs-scheduler/cfs_bandwidth01.c | 20 +- testcases/kernel/syscalls/madvise/madvise06.c | 29 +- 23 files changed, 534 insertions(+), 314 deletions(-) create mode 100644 testcases/kernel/controllers/memcg/memcontrol03.c create mode 100644 testcases/kernel/controllers/memcg/memcontrol_common.h
Signature · 5 lines
2.34.1 -- Mailing list info: https://lists.linux.it/listinfo/ltp