CHROMIUM: breakme: add hungtask support to /proc/breakme
authorMandeep Singh Baines <msb@chromium.org>
Thu, 12 May 2011 01:48:04 +0000 (18:48 -0700)
committerGrant Grundler <grundler@google.com>
Thu, 24 May 2012 22:06:04 +0000 (15:06 -0700)
commita3dcbfd481980a8d6fecfac217823156760a69e4
tree5328a862aa0e964fefb475bede53dec6eed57c9f
parente4dd33293275d176c7279cac367c15c217b11aae
CHROMIUM: breakme: add hungtask support to /proc/breakme

Adding this so that we can test the hung_task detector.

BUG=chromium-os:15086
TEST=see below

$ echo hungtask > /proc/breakme &
[1] 3755
$ dmesg
...
[  240.844119] INFO: task bash:3755 blocked for more than 120 seconds.
[  240.844130] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  240.844139] bash            D b6d629b8  7188  3755   3753 0x00000000
[  240.844165]  ac207ea4 00000082 795b6004 b6d629b8 79633f40 ac222780 79633f40 ac2229f4
[  240.844185]  ac2229f0 ac2229f0 79633f40 79633f40 dfec48db 00000015 dfe6517e 00000015
[  240.844204]  ac222780 ac3c46e4 00000002 01000041 795b59c0 00000002 000000d0 ac222780
[  240.844223] Call Trace:
[  240.844247]  [<793c9371>] schedule_timeout+0x1b/0x95
[  240.844262]  [<790980ff>] ? lru_cache_add_lru+0x3d/0x3f
[  240.844275]  [<790ac8c6>] ? page_add_new_anon_rmap+0x61/0x6f
[  240.844287]  [<790a554e>] ? handle_pte_fault+0x248/0x984
[  240.844301]  [<79199f30>] ? _copy_from_user+0x32/0x6e
[  240.844312]  [<793c9405>] schedule_timeout_uninterruptible+0x1a/0x1c
[  240.844325]  [<790f92d6>] write_breakme+0x9e/0x124
[  240.844337]  [<790a6a99>] ? handle_mm_fault+0x131/0x143
[  240.844350]  [<790f3996>] proc_reg_write+0x5f/0x73
[  240.844361]  [<790f9238>] ? write_breakme+0x0/0x124
[  240.844374]  [<790bd9e8>] vfs_write+0x8f/0x12c
[  240.844385]  [<790f3937>] ? proc_reg_write+0x0/0x73
[  240.844396]  [<790bdb26>] sys_write+0x40/0x65
[  240.844408]  [<790028cc>] sysenter_do_call+0x12/0x22

Change-Id: Iff031f084c4a12349e37ecea1319e2ed069f3592
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/739
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
fs/proc/breakme.c