Re: [PATCH v8 10/24] x86/resctrl: Allocate the cleanest CLOSID by searching closid_num_dirty_rmid

From: Reinette Chatre
Date: Sat Dec 16 2023 - 00:03:47 EST


Hi James,

On 12/15/2023 9:43 AM, James Morse wrote:
> MPAM's PMG bits extend its PARTID space, meaning the same PMG value can be
> used for different control groups.
>
> This means once a CLOSID is allocated, all its monitoring ids may still be
> dirty, and held in limbo.
>
> Instead of allocating the first free CLOSID, on architectures where
> CONFIG_RESCTRL_RMID_DEPENDS_ON_CLOSID is enabled, search
> closid_num_dirty_rmid[] to find the cleanest CLOSID.
>
> The CLOSID found is returned to closid_alloc() for the free list
> to be updated.
>
> Signed-off-by: James Morse <james.morse@xxxxxxx>
> Tested-by: Shaopeng Tan <tan.shaopeng@xxxxxxxxxxx>
> Tested-by: Peter Newman <peternewman@xxxxxxxxxx>
> Tested-by: Babu Moger <babu.moger@xxxxxxx>
> Reviewed-by: Shaopeng Tan <tan.shaopeng@xxxxxxxxxxx>
> Reviewed-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>
> Reviewed-by: Babu Moger <babu.moger@xxxxxxx>
> ---
> Changes since v4:
> * Dropped stale section from comment
>
> Changes since v5:
> * Renamed some variables.
>
> Changes since v7:
> * Made comments over closid_num_dirty_rmid() not a kdoc comment.

(This is an example of me not relying on you dropping my reviewed-by tag
to take a look at new changes.)

This change is unexpected and does not have anything to do with this patch.
Instead it just seems to undo a change that sneaked into patch #8
of this series.

Reinette