Re: [PATCH v3 14/21] x86/recstrl: Allow per-rmid arch private storage to be reset

From: Reinette Chatre
Date: Wed Mar 16 2022 - 17:51:13 EST


Hi James,

Note the subject line: "x86/recstrl" -> "x86/resctrl"

On 2/17/2022 10:21 AM, James Morse wrote:
> To abstract the rmid counters into a helper that returns the number
> of bytes counted, architecture specific per-rmid state is needed.
>
> It needs to be possible to reset this hidden state, as the values
> may outlive the life of an rmid, or the mount time of the filesystem.
>
> mon_event_read() is called with first = true when an rmid is first
> allocated in mkdir_mondata_subdir(). Add resctrl_arch_reset_rmid()
> and call it from __mon_event_count()'s rr->first check.
>
> Reviewed-by: Shaopeng Tan <tan.shaopeng@xxxxxxxxxxx>
> Signed-off-by: James Morse <james.morse@xxxxxxx>

Reinette