Commit d27567a
x86/resctrl: Move default group file creation to mount
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: Babu Moger <babu.moger@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Peter Newman <peternewman@google.com>
Reviewed-by: Tan Shaopeng <tan.shaopeng@jp.fujitsu.com>
Reviewed-by: Fenghua Yu <fenghua.yu@intel.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tested-by: Peter Newman <peternewman@google.com>
Tested-by: Tan Shaopeng <tan.shaopeng@jp.fujitsu.com>
Link: https://lore.kernel.org/r/20231017002308.134480-6-babu.moger@amd.com1 parent df5f3a1 commit d27567a
1 file changed
Lines changed: 34 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
57 | 60 | | |
58 | 61 | | |
59 | 62 | | |
| |||
2529 | 2532 | | |
2530 | 2533 | | |
2531 | 2534 | | |
2532 | | - | |
| 2535 | + | |
2533 | 2536 | | |
2534 | 2537 | | |
2535 | 2538 | | |
| 2539 | + | |
| 2540 | + | |
| 2541 | + | |
| 2542 | + | |
2536 | 2543 | | |
2537 | 2544 | | |
2538 | 2545 | | |
| |||
2541 | 2548 | | |
2542 | 2549 | | |
2543 | 2550 | | |
| 2551 | + | |
| 2552 | + | |
| 2553 | + | |
| 2554 | + | |
| 2555 | + | |
| 2556 | + | |
2544 | 2557 | | |
2545 | 2558 | | |
2546 | 2559 | | |
| |||
2597 | 2610 | | |
2598 | 2611 | | |
2599 | 2612 | | |
| 2613 | + | |
| 2614 | + | |
2600 | 2615 | | |
2601 | 2616 | | |
2602 | 2617 | | |
| |||
2667 | 2682 | | |
2668 | 2683 | | |
2669 | 2684 | | |
2670 | | - | |
2671 | 2685 | | |
2672 | 2686 | | |
2673 | 2687 | | |
| |||
2837 | 2851 | | |
2838 | 2852 | | |
2839 | 2853 | | |
| 2854 | + | |
2840 | 2855 | | |
2841 | 2856 | | |
2842 | 2857 | | |
| |||
3718 | 3733 | | |
3719 | 3734 | | |
3720 | 3735 | | |
3721 | | - | |
| 3736 | + | |
3722 | 3737 | | |
3723 | | - | |
3724 | | - | |
3725 | 3738 | | |
3726 | 3739 | | |
3727 | 3740 | | |
3728 | 3741 | | |
3729 | 3742 | | |
3730 | 3743 | | |
3731 | 3744 | | |
| 3745 | + | |
| 3746 | + | |
| 3747 | + | |
| 3748 | + | |
| 3749 | + | |
| 3750 | + | |
| 3751 | + | |
| 3752 | + | |
| 3753 | + | |
| 3754 | + | |
| 3755 | + | |
| 3756 | + | |
| 3757 | + | |
| 3758 | + | |
3732 | 3759 | | |
3733 | 3760 | | |
3734 | 3761 | | |
| |||
3738 | 3765 | | |
3739 | 3766 | | |
3740 | 3767 | | |
3741 | | - | |
3742 | | - | |
3743 | | - | |
3744 | | - | |
3745 | | - | |
3746 | | - | |
3747 | | - | |
3748 | | - | |
3749 | | - | |
3750 | | - | |
3751 | 3768 | | |
3752 | | - | |
3753 | | - | |
3754 | 3769 | | |
3755 | 3770 | | |
3756 | 3771 | | |
| |||
3872 | 3887 | | |
3873 | 3888 | | |
3874 | 3889 | | |
3875 | | - | |
3876 | | - | |
3877 | | - | |
| 3890 | + | |
3878 | 3891 | | |
3879 | 3892 | | |
3880 | 3893 | | |
3881 | | - | |
| 3894 | + | |
3882 | 3895 | | |
3883 | 3896 | | |
3884 | 3897 | | |
| |||
3911 | 3924 | | |
3912 | 3925 | | |
3913 | 3926 | | |
3914 | | - | |
3915 | | - | |
3916 | 3927 | | |
3917 | 3928 | | |
3918 | 3929 | | |
| |||
3922 | 3933 | | |
3923 | 3934 | | |
3924 | 3935 | | |
3925 | | - | |
3926 | 3936 | | |
0 commit comments