Re: [RFC PATCH 1/5] cpumask: Introduce cpu parked mask

From: Shrikanth Hegde
Date: Mon Jun 23 2025 - 04:11:45 EST




On 5/27/25 20:36, Yury Norov wrote:
On Fri, May 23, 2025 at 11:44:44PM +0530, Shrikanth Hegde wrote:
CPU is said to be parked, when underlying physical CPU is not
available. This happens when there is contention for CPU resource in
para-virtualized case. One should avoid using these CPUs.

Build and maintain this state of parked CPUs. Scheduler will use this
information and push the tasks out as soon as it can.

This 'parked' term sounds pretty obscured. Maybe name it in
a positive sense, and more explicit, like cpu_paravirt_mask.


I still dont know a better name. Maybe something like cpu_avoid_mask and
cpu avoid(cpu)? I would like to retain a notion that these CPU shouldn't be used
at the moment.

Also, shouldn't this be conditional on CONFIG_PARAVIRT?


I moved the uses of it under a static key which should make it a nop for
others. That keeps code relatively simpler. Hope that's ok.

Thanks,
Yury