Re: CPU Hotplug: Hotplug Script And SIGPWR

Stefan Smietanowski
2004-01-20T08:37:34Z

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?

If the default was to re-affine to another CPU then
we can optionally send it a SIGPWR as well to let it
know it was re-affined.

But the SIGPWR is in my eyes optional and the above scenario
should handle the cases imo.

// Stefan