Kernel Bug Tracker – Bug 10897
Disabling irq balance in kernel prevents laptop power off by sysrq
Last modified: 2008-10-27 23:20:36 UTC
Latest working kernel version: do not know
Earliest failing kernel version: do not know
Hardware Environment: laptop acer ferrari 1100 (amd x2 / sb 600)
Software Environment: kernel sysrq
Problem Description: Disabling irq balance in kernel prevents laptop power off by sysrq
Steps to reproduce:
1. Compile kernel with irq balance enabled - sysrq-off is working
2. disable irq balance either with noirqbalance boot kernel option or in config (need recompiling) - sysrq-off do not works
does this have any effect on
or is this a sysrq specific issue?
do the other sysrq commands still work?
poweroff still works, other sysrq commands works too.
Will you please get the output of dmesg through serial console in case of sysrq-off can't work?
Sorry, my laptop has no serial port (acer ferrari 1100). Did you try to reproduce this bug ? If it is not reproducable on your hardware I can try to find one with the serial port.
Created attachment 16613 [details]
patch: do sysrq power off in a thread
power off need to disable non boot cpus.
run this in a thread rather than in a work queue so that it can be scheduled to the boot processor when necessary.
please apply this patch to the latest kernel and see if it helps. :)
Now I've got oopses in any sysrq power off case. Oops image attached, sorry for quality - old treo camera ;)
Created attachment 16615 [details]
Created attachment 16616 [details]
do sysrq on cpu0
please give it a try
Thanks, last patch works for me. Don't know if such big delay (1 sec) is needed before poweroff.
the patch in comment #8 is not for upstream. It just help me verifies the problem.
I'll cook up an upstream patch some time next week as I'm really busy now. :)
is that okay?
Ok, I can wait as long as needed.
Created attachment 16660 [details]
Created attachment 16661 [details]
please apply these two patches and see if it can work for you. :)
Thanks, it works too.
Created attachment 16706 [details]
Created attachment 16707 [details]
please test these two patches,
I'll try to push them upstream if they work for you. :)
This version works ok.
shipped in linux-2.6.27-rc1
Author: Zhang Rui <email@example.com>
Date: Wed Jul 23 21:28:40 2008 -0700
pm: schedule sysrq poweroff on boot cpu
schedule sysrq poweroff on boot cpu.
sysrq poweroff needs to disable nonboot cpus, and we need to run this on boot
cpu to avoid any recursion. http://bugzilla.kernel.org/show_bug.cgi?id=10897
[firstname.lastname@example.org: build fix]
Signed-off-by: Zhang Rui <email@example.com>
Tested-by: Rus <firstname.lastname@example.org>
Signed-off-by: Rafael J. Wysocki <email@example.com>
Acked-by: Pavel Machek <firstname.lastname@example.org>
Signed-off-by: KOSAKI Motohiro <email@example.com>
Signed-off-by: Andrew Morton <firstname.lastname@example.org>
Signed-off-by: Linus Torvalds <email@example.com>