Re: [PATCH] cpu_hotplug: don't affect current task's affinity

From: Lai Jiangshan
Date: Wed Jul 22 2009 - 22:06:33 EST


Andrew Morton wrote:

>
> Or are you saying that the mask _should_ have been 0-1,3 but the kernel
> incorrectly set it to "0"?
>

Yes, the mask should become 0-1,3. when original is 2 after cpu2 is offlined.

When cpu2 is offined

original mask after cpu2 is offined
1 1
1-2 1
0-3 0-1,3
2 0-1,3
2(the task who do the offline) 0

I think the last line is incorrect. This patch fix it.


>
> Also, it says "The recovery of the current tasks's cpus_allowed will
> fail under some conditions". What are those conditions?
>

A condition is described in changelog(the same as above).

An example of other condition: the CPUSET of the task is changed
when this task do the offline... the last recovery may fails.

--
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/