cgroup_fj_stress: Avoid killall
PATCH 1/1 cgroup_fj_stress: Avoid killall
We discovered problems that killall didn't catched all processes. With this patch, we collect the pids manually and kill them one after the other.
--- testcases/kernel/controllers/cgroup_fj/cgroup_fj_stress.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
testcases/kernel/controllers/cgroup_fj/cgroup_fj_stress.sh +6 -3
@@ -74,6 +74,7 @@ setup export TMPFILE=./tmp_tasks.$$ count=0 +collected_pids="" build_subgroups() {
@@ -107,6 +108,7 @@ attach_task() if [ -z "$ppid" ]; then cgroup_fj_proc& pid=$! + collected_pids="$collected_pids $pid" else pid="$ppid" fi
@@ -148,9 +150,10 @@ case $attach_operation in "each" ) tst_resm TINFO "Attaching task to each subgroup" attach_task "$start_path" 0 - ROD killall -9 "cgroup_fj_proc" - # Wait for attached tasks to terminate - wait + for pid in $collected_pids; do + ROD kill -9 "$pid" + wait "$pid" + done ;; * ) ;;
Signature · 1 line
2.16.4
PATCH 1/1 cgroup_fj_stress: Avoid killall
Hi Clements,
Quoted 3 lines
We discovered problems that killall didn't catched all processes. With this patch, we collect the pids manually and kill them one after the other.
LGTM.
I wonder if we also want to kill cgroup_fj_proc this way (see cgroup_fj_common.sh).
I guess you're not planning to create minimal reproducer to prove the problem of left processes after killall, are you?
Quoted 10 lines
Signed-off-by Clemens Famulla-Conrad <[email protected]>--- testcases/kernel/controllers/cgroup_fj/cgroup_fj_stress.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)testcases/kernel/controllers/cgroup_fj/cgroup_fj_stress.sh +0
-0
testcases/kernel/controllers/cgroup_fj/cgroup_fj_stress.sh setup · line 77
Quoted 4 lines
testcases/kernel/controllers/cgroup_fj/cgroup_fj_stress.sh +1
-0@@ -74,6 +74,7 @@ setup export TMPFILE=./tmp_tasks.$$ count=0 +collected_pids=""
nit:
collected_pids=
...
Kind regards,
Petr
PATCH 1/1 cgroup_fj_stress: Avoid killall
Hi Petr,
On Tue, 2019-11-05 at 14:20 +0100, Petr Vorel wrote:
<snip>
Quoted 2 lines
I wonder if we also want to kill
cgroup_fj_procthis way (seecgroup_fj_common.sh).
I'm not sure if I understand you. We do kill cgroup_fj_proc this way. The killall -9 cgroup_fj_proc call in cgrouip_fj_common.sh looks for me like a cleaner and there is no wait or similar afterwards, so I would guess we are not facing the problem here. And I would keep killall here.
As far as I can see, all other cgroup_fj_proc& calls already kill them separately.
Quoted 3 lines
I guess you're not planning to create minimal reproducer to prove the problem of
left processes after killall, are you?
Sure nice idea, I can give it a try. But not within this patchset.
Thanks
Clemens
PATCH 1/1 cgroup_fj_stress: Avoid killall
Hi Clemens,
Quoted 10 lines
Quoted 2 lines
I wonder if we also want to kill
cgroup_fj_procthis way (seecgroup_fj_common.sh).I'm not sure if I understand you. We do kill
cgroup_fj_procthis way. Thekillall -9 cgroup_fj_proccall incgrouip_fj_common.shlooks for me like a cleaner and there is nowaitor similar afterwards, so I would guess we are not facing the problem here. And I would keep killall here.
As far as I can see, all othercgroup_fj_proc&calls already kill them separately.
OK, merged :).
Thanks!
Quoted 5 lines
Quoted 3 lines
I guess you're not planning to create minimal reproducer to prove the problem of
left processes after killall, are you?Sure nice idea, I can give it a try. But not within this patchset.
Thanks!
Kind regards,
Petr