* [LTP] [PATCH] controllers/cpuset: default cpuset.sched_load_balance to 1
@ 2022-05-27 7:21 Hongchen Zhang
2022-06-13 15:08 ` Petr Vorel
2022-06-13 15:13 ` Petr Vorel
0 siblings, 2 replies; 4+ messages in thread
From: Hongchen Zhang @ 2022-05-27 7:21 UTC (permalink / raw)
To: Petr Vorel, Li Wang; +Cc: ltp, Hongchen Zhang
when we exited between the cpuset test,we may leave /dev/cpuset
not cleared. And we did the cpuset test again, we would set the
cpuset.sched_load_balance to 0 as following:
setup()
if [ -e "$CPUSET" ]
cleanup
echo $SCHED_LB_VALUE > $SCHED_LB
as the default value of cpuset.sched_load_balance is 1 at the time
cpuset mounted, so it is reasonably to be set to 1.
Signed-off-by: Hongchen Zhang <zhanghongchen@loongson.cn>
---
testcases/kernel/controllers/cpuset/cpuset_funcs.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testcases/kernel/controllers/cpuset/cpuset_funcs.sh b/testcases/kernel/controllers/cpuset/cpuset_funcs.sh
index 9939f13..3991475 100755
--- a/testcases/kernel/controllers/cpuset/cpuset_funcs.sh
+++ b/testcases/kernel/controllers/cpuset/cpuset_funcs.sh
@@ -61,7 +61,7 @@ CLONE_CHILDREN="/dev/cpuset/cgroup.clone_children"
CHILDREN_VALUE="0"
HOTPLUG_CPU="1"
SCHED_LB="/dev/cpuset/cpuset.sched_load_balance"
-SCHED_LB_VALUE="0"
+SCHED_LB_VALUE="1"
cpuset_log()
{
--
1.8.3.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH] controllers/cpuset: default cpuset.sched_load_balance to 1
2022-05-27 7:21 [LTP] [PATCH] controllers/cpuset: default cpuset.sched_load_balance to 1 Hongchen Zhang
@ 2022-06-13 15:08 ` Petr Vorel
2022-06-13 15:13 ` Petr Vorel
1 sibling, 0 replies; 4+ messages in thread
From: Petr Vorel @ 2022-06-13 15:08 UTC (permalink / raw)
To: Hongchen Zhang; +Cc: ltp, Richard Palethorpe
Hi Hongchen,
> when we exited between the cpuset test,we may leave /dev/cpuset
> not cleared. And we did the cpuset test again, we would set the
> cpuset.sched_load_balance to 0 as following:
> setup()
> if [ -e "$CPUSET" ]
> cleanup
> echo $SCHED_LB_VALUE > $SCHED_LB
> as the default value of cpuset.sched_load_balance is 1 at the time
> cpuset mounted, so it is reasonably to be set to 1.
It makes sense to use the default value (1), but how about setting values only
when really get? That'd be IMHO the safest way. WDYT?
-CHILDREN_VALUE="0"
+CHILDREN_VALUE=
HOTPLUG_CPU="1"
SCHED_LB="/dev/cpuset/cpuset.sched_load_balance"
-SCHED_LB_VALUE="0"
+SCHED_LB_VALUE=
...
- echo $CHILDREN_VALUE > $CLONE_CHILDREN
- echo $SCHED_LB_VALUE > $SCHED_LB
+ [ "$CHILDREN_VALUE" ] && echo $CHILDREN_VALUE > $CLONE_CHILDREN
+ [ "$SCHED_LB_VALUE" ] && echo $SCHED_LB_VALUE > $SCHED_LB
Kind regards,
Petr
> Signed-off-by: Hongchen Zhang <zhanghongchen@loongson.cn>
> ---
> testcases/kernel/controllers/cpuset/cpuset_funcs.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> diff --git a/testcases/kernel/controllers/cpuset/cpuset_funcs.sh b/testcases/kernel/controllers/cpuset/cpuset_funcs.sh
> index 9939f13..3991475 100755
> --- a/testcases/kernel/controllers/cpuset/cpuset_funcs.sh
> +++ b/testcases/kernel/controllers/cpuset/cpuset_funcs.sh
> @@ -61,7 +61,7 @@ CLONE_CHILDREN="/dev/cpuset/cgroup.clone_children"
> CHILDREN_VALUE="0"
> HOTPLUG_CPU="1"
> SCHED_LB="/dev/cpuset/cpuset.sched_load_balance"
> -SCHED_LB_VALUE="0"
> +SCHED_LB_VALUE="1"
> cpuset_log()
> {
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH] controllers/cpuset: default cpuset.sched_load_balance to 1
2022-05-27 7:21 [LTP] [PATCH] controllers/cpuset: default cpuset.sched_load_balance to 1 Hongchen Zhang
2022-06-13 15:08 ` Petr Vorel
@ 2022-06-13 15:13 ` Petr Vorel
1 sibling, 0 replies; 4+ messages in thread
From: Petr Vorel @ 2022-06-13 15:13 UTC (permalink / raw)
To: Hongchen Zhang; +Cc: ltp
Hi Hongchen,
The script is really messy that I understand why people are rewriting cgroup
tests into C which has also cgroup v2 support among other improvements. Although
FYI there is ongoing effort to add this cgroup v2 support also to shell tests,
my guess is that sooner or later anything relevant will be rewritten to LTP C API.
Kind regards,
Petr
[1] https://patchwork.ozlabs.org/project/ltp/list/?series=297465&state=*
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
* [LTP] [PATCH] controllers/cpuset: default cpuset.sched_load_balance to 1
@ 2022-05-27 7:16 Hongchen Zhang
0 siblings, 0 replies; 4+ messages in thread
From: Hongchen Zhang @ 2022-05-27 7:16 UTC (permalink / raw)
To: Wang Xin, Petr Vorel, Li Wang; +Cc: ltp, Hongchen Zhang
when we exited between the cpuset test,we may leave /dev/cpuset
not cleared. And we did the cpuset test again, we would set the
cpuset.sched_load_balance to 0 as following:
setup()
if [ -e "$CPUSET" ]
cleanup
echo $SCHED_LB_VALUE > $SCHED_LB
as the default value of cpuset.sched_load_balance is 1 at the time
cpuset mounted, so it is reasonably to be set to 1.
Signed-off-by: Hongchen Zhang <zhanghongchen@loongson.cn>
---
testcases/kernel/controllers/cpuset/cpuset_funcs.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testcases/kernel/controllers/cpuset/cpuset_funcs.sh b/testcases/kernel/controllers/cpuset/cpuset_funcs.sh
index 9939f13..3991475 100755
--- a/testcases/kernel/controllers/cpuset/cpuset_funcs.sh
+++ b/testcases/kernel/controllers/cpuset/cpuset_funcs.sh
@@ -61,7 +61,7 @@ CLONE_CHILDREN="/dev/cpuset/cgroup.clone_children"
CHILDREN_VALUE="0"
HOTPLUG_CPU="1"
SCHED_LB="/dev/cpuset/cpuset.sched_load_balance"
-SCHED_LB_VALUE="0"
+SCHED_LB_VALUE="1"
cpuset_log()
{
--
1.8.3.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-06-13 15:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-27 7:21 [LTP] [PATCH] controllers/cpuset: default cpuset.sched_load_balance to 1 Hongchen Zhang
2022-06-13 15:08 ` Petr Vorel
2022-06-13 15:13 ` Petr Vorel
-- strict thread matches above, loose matches on Subject: below --
2022-05-27 7:16 Hongchen Zhang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.