Re: [PATCH v1 20/31] x86/resctrl: Allow an architecture to disable pseudo lock

Reinette Chatre
2024-04-09T03:24:17Z

Hi James,

On 3/21/2024 9:50 AM, James Morse wrote:
> Pseudo-lock relies on knowledge of the micro-architecture to disable
> prefetchers etc.
>
> On arm64 these controls are typically secure only, meaning linux can't
> access them. Arm's cache-lockdown feature works in a very different
> way. Resctrl's pseudo-lock isn't going to be used on arm64 platforms.
>
> Add a Kconfig symbol that can be selected by the architecture. This
> enables or disables building of the psuedo_lock.c file, and replaces

pseudo_lock.c

> the functions with stubs. An additional IS_ENABLED() check is needed
> in rdtgroup_mode_write() so that attempting to enable pseudo-lock
> reports an "Unknown or unsupported mode" to user-space.
>

I am missing something here. It is not obvious to me why the IS_ENABLED()
check is needed. Wouldn't rdtgroup_locksetup_enter()
return -EOPNOTSUPP if CONFIG_RESCTRL_FS_PSEUDO_LOCK is not enabled?

Reinette