From: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
To: Rusty Russell <rusty@rustcorp.com.au>, linux-kernel@vger.kernel.org
Subject: [PATCH 0/3] patches for stop_machine
Date: Tue, 29 Apr 2008 10:25:09 +0900 [thread overview]
Message-ID: <481678F5.7080504@jp.fujitsu.com> (raw)
Hi Rusty and all,
This is a proposal of minor improvement for kernel/stop_machine.c
[PATCH 1/3] stop_machine: short exit path for if we cannot create enough threads
[PATCH 2/3] stop_machine: add timeout for child thread deployment
[PATCH 3/3] stop_machine: add stopmachine_timeout sysctl entry
The main topic is "how about adding timeout for stop_machine?"
I think it will act as a safety net.
For example (of silly situation), system can hung with following way:
# ./silly.sh
run an evil loop task on AP
pid 6138's current affinity mask: ff
pid 6138's new affinity mask: fe
to pretend lock up, chrt -f -p 99 6138
loop[6138] is on CPU #4
to do stopmachine, try to off #7
echo 0 > /sys/devices/system/cpu/cpu7/online
(never return)
After applying patch set here, it can be prevented.
# ./silly.sh
:
echo 0 > /sys/devices/system/cpu/cpu7/online
stopmachine: Failed to stop machine in time(5s). Are there any CPUs on file?
./silly.sh: line 22: echo: write error: Device or resource busy
offline is failed
OK, kill evil loop[6138]
try to off #7 again
echo 0 > /sys/devices/system/cpu/cpu7/online
CPU #7 is now offline
done!
Please refer description of each patch for the detail.
All comments are welcomed.
Thanks,
H.Seto
next reply other threads:[~2008-04-29 1:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-29 1:25 Hidetoshi Seto [this message]
2008-04-29 1:29 ` [PATCH 1/3] stop_machine: short exit path for if we cannot create enough threads Hidetoshi Seto
2008-05-06 2:57 ` Rusty Russell
2008-04-29 1:31 ` [PATCH 2/3] stop_machine: add timeout for child thread deployment Hidetoshi Seto
2008-04-29 1:33 ` [PATCH 3/3] stop_machine: add stopmachine_timeout sysctl entry Hidetoshi Seto
2008-04-29 2:25 ` [PATCH 0/3] patches for stop_machine Hidetoshi Seto
2008-05-02 20:33 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=481678F5.7080504@jp.fujitsu.com \
--to=seto.hidetoshi@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox