Re: [PATCH v5 04/24] cpumask: Introduce cpu_preferred_mask

From: Peter Zijlstra

Date: Fri Jun 26 2026 - 05:36:32 EST


On Thu, Jun 25, 2026 at 06:16:28PM +0530, Shrikanth Hegde wrote:
> This patch does
> - Declare and Define cpu_preferred_mask.
> - Get/Set helpers for it.

There is a blub in submitting-patches.rst about how 'this patch' is
basically a red-flag for a changelog.

The changelog is per-definition pertaining to 'this patch', therefore
stating this is a tautology. Further, it is often fairly clear what the
patch does, but less clear as to why.

So the suggestion is to phrase this like:

Provide cpu_preferred_mask infrastructure (definitions, declarations and
helper methods) to facilitate ....


> Values are set/clear by the scheduler by detecting the steal time values.
>
> A CPU is set to preferred when it becomes active. Later it may be
> marked as non-preferred depending on steal time values with
> steal monitor being enabled.
>
> Always maintain design construct of preferred is subset of active.
> i.e. preferred ⊆ active ⊆ online ⊆ present ⊆ possible
>
> Signed-off-by: Shrikanth Hegde <sshegde@xxxxxxxxxxxxx>