Commit 7e6e783f authored by Babu Moger's avatar Babu Moger Committed by Zeng Heng
Browse files

x86/resctrl: Move default group file creation to mount

mainline inclusion
from mainline-v6.7-rc1
commit d27567a0eb54be457b25e240593fdbd1c35c8618
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I8T2RT

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d27567a0eb54be457b25e240593fdbd1c35c8618



--------------------------------

The default resource group and its files are created during kernel init
time. Upcoming changes will make some resctrl files optional based on
a mount parameter. If optional files are to be added to the default
group based on the mount option, then each new file needs to be created
separately and call kernfs_activate() again.

Create all files of the default resource group during resctrl mount,
destroyed during unmount, to avoid scattering resctrl file addition
across two separate code flows.

Signed-off-by: default avatarBabu Moger <babu.moger@amd.com>
Signed-off-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: default avatarPeter Newman <peternewman@google.com>
Reviewed-by: default avatarTan Shaopeng <tan.shaopeng@jp.fujitsu.com>
Reviewed-by: default avatarFenghua Yu <fenghua.yu@intel.com>
Reviewed-by: default avatarReinette Chatre <reinette.chatre@intel.com>
Reviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tested-by: default avatarPeter Newman <peternewman@google.com>
Tested-by: default avatarTan Shaopeng <tan.shaopeng@jp.fujitsu.com>
Link: https://lore.kernel.org/r/20231017002308.134480-6-babu.moger@amd.com


Signed-off-by: default avatarZeng Heng <zengheng4@huawei.com>
parent f526865d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment