Re: [PATCH] stop on cpu lost
From: Andrew Morton
Date: Thu Jun 22 2006 - 01:57:14 EST
On Tue, 20 Jun 2006 12:51:59 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:
> When the application is mis-configurated at cpu hot removal, a task's
> cpus_allowd can be empty. this patch adds sysctl to stop tasks whose
> cpus_allowed is empty.
>
> I think there isn't one good answer to handle this problem and this is
> depend on system management policy. In a system, forced migration is better
> than stop. In another, stopping tasks (and killing) will meet requirement.
>
> How about this ?
>
> -Kame
>
> Now, when a task loses all of its allowed cpus because of cpu hot removal,
> it will be foreced to migrate to not-allowed cpus.
>
> In this case, the task is not properly reconfigurated by a user before
> cpu-hot-removal. Here, the task (and system) is in a unexpeced wrong state.
> This migration is maybe one of realistic workarounds. But sometimes it will be
> harmfull.
> (stealing other cpu time, making bugs in thread controllers, do some unexpected
> execution...)
>
> This patch adds sysctl "sigstop_on_cpu_lost". When sigstop_on_cpu_lost==1,
> a task which losts is cpu will be stopped by SIGSTOP.
> Depends on system management policy, mis-configurated applications are stopped.
>
Well that's a pretty unpleasant patch, isn't it?
But I guess it's policy, and if we cannot think of anything better then we'll
have to do it this way :(
>
>
> include/linux/sysctl.h | 1 +
> kernel/sched.c | 14 ++++++++++++++
> kernel/sysctl.c | 14 ++++++++++++++
An update to Documentation/cpu-hotplug.txt would seem appropriate, please, and a
line in Documentation/sysctl/kernel.txt which refers to it.
-
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/