Re: [Patch] panic.c

From: Jan Engelhardt
Date: Sun Aug 05 2007 - 11:35:47 EST



On Aug 5 2007 17:28, JÃrg Hoffmann wrote:
>Hello everybody,
>(This is the first time i send in a patch, so correct me if IÂm doing
>something wrong)

See Documentation/SubmittingPatches. (And perhaps, U+0092 should be replaced by
something visible ;-)

>This patch causes the cpu to stop instead of using an endless loop (IÂm
>not sure if this works with the watchdog so please take a review).
>The idea behind this is to keep the power usage on panicÂd machines
>(without auto-reboot) low. Another point is in an Virtual Machine
>environment the process of the VM is using 100% of the host-cpu. This
>would stuck other programs or VMs. This patch brings the VM to stop and
>keeps the cpu usage below 1%.
>Â
>I have tested the patch in an VM, the only change is mdelay(); to
>cpu_idle(); it doesnÂt need more libs and should have no special
>depencies to consider.

cpu_idle() uses quite a lot of variables which may be invalid after a panic.

Something similar has been mentioned previously,
http://lkml.org/lkml/2006/6/19/303

>The panic-blink doesnÂt work further so it might be removed if there is
>no better way.
>Â
>Maybe someone has an better idea for this ÂproblemÂ
>Â

Jan
--