> Subject: cpu_hotplug: don't affect current task's affinity> From: Lai Jiangshan <laijs@cn.fujitsu.com>>> _cpu_down() changes the current task's affinity and then recovers it at> the end.>> It has two problems:

Yes.

But can't we make a much more simple patch ?

Why should we play with set_cpus_allowed() at all? We can just migratethe caller of _cpu_down() before other tasks, right after take_cpu_down()does __cpu_disable()->remove_cpu_from_maps().

No?

Oleg.

------------------------------------------------------------------------Uncompiled, and we need to export move_task_off_dead_cpu(). Just toexplain what I mean.