On 25.06.24 10:33, Jan Beulich wrote:
On 25.06.2024 10:27, Juergen Gross wrote:
In case cpu_schedule_up() is failing to allocate memory for struct
sched_resource,

Or (just to mention it again) in case the function isn't called at all
because some earlier CPU_UP_PREPARE handler fails.

This remark made me looking into the notifier implementation.

I think this patch should be reworked significantly:

In cpu_up() the CPU_UP_CANCELED notifier call is using the same
notifier_block as the one used by CPU_UP_PREPARE before. This means,
that only the handlers which didn't fail for CPU_UP_PREPARE will be
called with CPU_UP_CANCELED.

So there is no such case as "in case the function isn't called at all
because some earlier CPU_UP_PREPARE handler fails".

And a failure of cpu_schedule_up() needs to undo all externally visible
modifications instead of hoping that the CPU_UP_CANCELED notifier will
do that.

So: V2 of the patch will be needed.


Juergen

Attachment: OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to