RE: [PATCH v4 4/7] fs,x86/resctrl: Add architecture hooks for every mount/unmount

From: Luck, Tony

Date: Wed Apr 22 2026 - 18:45:34 EST


> 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.

-Tony