Re: [PATCH v4 4/7] fs,x86/resctrl: Add architecture hooks for every mount/unmount
From: Reinette Chatre
Date: Wed Apr 22 2026 - 19:17:37 EST
Hi Tony,
On 4/22/26 3:44 PM, Luck, Tony wrote:
>> I think I am missing something here since I have been assuming all along
>> that intel_pmt_put_feature_group() is and will continue to be called from the
>> new unmount handler.
>
> My problem is not with unmount. It is with resctrl_arch_pre_mount().
>
> With no locks held, I can't tell whether this is a genuine attempt to mount,
> or a doomed-to-fail attempt to remount. There could be arbitrarily many
> parallel calls to resctrl_arch_pre_mount() leading to races that I find hard
> to handle.
>
> In my earlier attempts to deal with this I acquired a lock in resctrl_arch_pre_mount()
> and held until the resctrl_arch_mount_result() call from filesystem.
>
> This seemed complex, and so I moved the locking to the file system, and here
> we are today.
I am not able to decipher the issues you are facing since your response here
deleted my responses to your questions on how I think this can be handled. If you
find that my proposal to do this without an additional lock has flaws then please
do point them out instead of ignoring them.
Reinette