Re: [PATCH v2 22/35] x86/resctrl: Make resctrl_arch_pseudo_lock_fn() take a plr

From: James Morse
Date: Fri Jun 14 2024 - 09:58:40 EST


Hi Dave,

On 26/04/2024 16:08, Dave Martin wrote:
> From: James Morse <james.morse@xxxxxxx>
>
> resctrl_arch_pseudo_lock_fn() has architecture specific behaviour,
> and takes a struct rdtgroup as an argument.
>
> After the filesystem code moves to /fs/, the definition of struct
> rdtgroup will not be available to the architecture code.
>
> The only reason resctrl_arch_pseudo_lock_fn() wants the rdtgroup is
> for the CLOSID. Embed that in the pseudo_lock_region as a closid,
> and move the definition of struct pseudo_lock_region to resctrl.h.

> FYI: James Morse:
>
> * Review the v2 change below, in case there was any functional reason
> for distinguishing "hw" closids here.
>
> Changes in v2:
>
> * [Commit message only] Typo fix:
> s/hw_closid/closid/g
>
> (The name "closid" is used in the code. If there is a distinction
> between "hardware" closids and resctrl closids, it doesn't seem to
> be explicit in the naming elsewhere.)

Heh, this is a blast from the past!

In 2018 I was trying to get resctrl to convert 'closid' to 'hw_closid' using some
architecture provided helpers. This was an alternative way of folding the CDP code to hide
the differences between x86/arm64. I decided the fs/resctrl code was cleaner without it -
and arm64 can just juggle the numbers instead.


Thanks,

James