Re: CPU Hotplug: Hotplug Script And SIGPWR

Nick Piggin
2004-01-20T08:50:41Z

Stefan Smietanowski wrote:

> Hi.
>
>>> We have a conflict of priority here. If an RT task is affined to
>>> CPU A and
>>> CPU A gets yanked out, what do we do?
>>>
>>> Obviously the RT task can't keep running as it was. It was affined
>>> to A.
>>> Maybe for a good reason. I see we have a few choices here:
>>>
>>> * re-affine it automatically, thereby silently undoing the explicit
>>> affinity.
>>> * violate it's RT scheduling by not running it until it has been
>>> re-affined
>>> or CPU A returns to the pool/
>>>
>>> Sending it a SIGPWR means you have to run it on a different CPU that
>>> it was
>>> affined to, which is already a violation.
>>>
>>
>> At least the task has the option to handle the problem.
>
>
> Why not make a flag that handles that choice explicitly.
>
> If the task sets the affinity itself the default is to
> re-affine it if the cpu gets yanked but if the task wants to
> be suspended until the CPU reappears it can set a flag for
> that to happen if the CPU is yanked.
>
> If we have a program that can start another program on a
> specific CPU then that program can dictate how the task
> should respond by setting the flag the same way
> as the task would if the task would be the one selecting
> a specific CPU. Doesn't that fix the problem?

Well I'll admit it would usually be more flexible if you freeze
the process and run hotplug scripts to handle cpu affinity.

Unfortunately it introduces unfixable robustness and realtime
problems by design.