Re: [PATCH] Softlockup (out of cpu) killer

From: Peter Zijlstra
Date: Mon Dec 12 2011 - 04:39:13 EST


On Sun, 2011-12-11 at 14:48 -0800, Vincent Li wrote:
> In kernel, there is out of memory (OOM) killer, why not make an out of cpu (OOC) killer?
> I tested following patch by running an user-space cpu hogging process and the softlockukp
> detector killed the process successfully.
>
> Softlockup could be caused by user-space process hogging cpu, add softlockup_kill kernel
> config to allow kernel to kill the user space cpu hogging process. this feature is
> useful for high availability systems that have uptime gurantees and where a softlockup
> must be resolved ASAP
>
> echo 1 > /proc/sys/kernel/softlockukp_kill to enable cpu hog process killer
> echo 0 > /proc/sys/kernel/softlockup_kill to disable cpu hog process killer
>
> Signed-off-by: Vincent Li <vincent.mc.li@xxxxxxxxx>

Your whole premise is broken. Being a cpu hog and the softlockup
mechanism aren't related at all.

Furthermore, since the normal scheduling policy is a proportional one, a
cpu hog can't in fact starve anybody (although a fork bomb could). And
FIFO/RR are privileged ops.

Furthermore the distinction between memory and cpu-time is that memory
isn't a renewable resource, whereas time is. There's always more time,
but there's not always more memory.

So no, I don't think either you patch nor your concept make any sense.
Consider it nacked.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/