Skip to contentSkip to conversation

cgroup: remove redundant addition of memory controller

PATCH Applied Usama Arif 2 participants 4 messages May 2, 2024 – May 3, 2024

Subsystems (4)
lore
Share & tools
lore

Usama Arif

author
#0 lore raw

v2 cover cgroup: remove redundant addition of memory controller

Memory controller is already added in main which invokes the test, hence this does not need to be done in test_no_kmem_bypass.

v1 -> v2:
- Add more description to commit message.

Usama Arif (1):
selftests: cgroup: remove redundant addition of memory controller

 tools/testing/selftests/cgroup/test_zswap.c | 2 --
 1 file changed, 2 deletions(-)
Signature · 1 line
2.43.0
author
#1 lore raw

PATCH v2 1/1 selftests: cgroup: remove redundant addition of memory controller

Memory controller is already added in main which invokes the test, hence this does not need to be done in test_no_kmem_bypass.

---
 tools/testing/selftests/cgroup/test_zswap.c | 2 --
 1 file changed, 2 deletions(-)
tools/testing/selftests/cgroup/test_zswap.c +0 -2
index cd864ab825d0..19ac29c533e0 100644
@@ -485,8 +485,6 @@ static int test_no_kmem_bypass(const char *root)
 	trigger_allocation_size = sys_info.totalram / 20;
 
 	/* Set up test memcg */
-	if (cg_write(root, "cgroup.subtree_control", "+memory"))
-		goto out;
 	test_group = cg_name(root, "kmem_bypass_test");
 	if (!test_group)
 		goto out;
Signature · 1 line
2.43.0
Acked-by on v2 1/1
#2 lore raw

Re: [PATCH v2 1/1] selftests: cgroup: remove redundant addition of memory controller

Quoted 3 lines · Usama Arif

Memory controller is already added in main which invokes the test, hence this does not need to be done in test_no_kmem_bypass.

nit: The memory controller is "enabled", not added. Same for the subject line.

Quoted 2 lines
Quoted 20 lines
---
 tools/testing/selftests/cgroup/test_zswap.c | 2 --
 1 file changed, 2 deletions(-)
tools/testing/selftests/cgroup/test_zswap.c +0 -3
index cd864ab825d0..19ac29c533e0 100644
@@ -485,8 +485,6 @@ static int test_no_kmem_bypass(const char *root)
        trigger_allocation_size = sys_info.totalram / 20;
 
        /* Set up test memcg */
-       if (cg_write(root, "cgroup.subtree_control", "+memory"))
-               goto out;
        test_group = cg_name(root, "kmem_bypass_test");
        if (!test_group)
                goto out;
--

2.43.0

#3 lore raw
In reply to Usama Arif
Quoted 4 lines · Usama Arif

Memory controller is already added in main which invokes the test, hence this does not need to be done in test_no_kmem_bypass.

A cover letter is not required. In cases like this where providing additional context to the commit log is not needed, it is better to omit it. This especially applies when there is a single patch in the series.

If you want to add version diff info or any additional context, you can add it after "---" in the patch itself. Example:
https://lore.kernel.org/linux-mm/[email protected]/.

Quoted 13 lines

v1 -> v2:
- Add more description to commit message.

Usama Arif (1):
selftests: cgroup: remove redundant addition of memory controller

 tools/testing/selftests/cgroup/test_zswap.c | 2 --
 1 file changed, 2 deletions(-)

--
2.43.0