[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3404690d-f1cf-4838-aa1a-788a6210b72f@nvidia.com>
Date: Mon, 14 Apr 2025 16:21:02 -0700
From: Fenghua Yu <fenghuay@...dia.com>
To: James Morse <james.morse@....com>, x86@...nel.org,
linux-kernel@...r.kernel.org
Cc: Reinette Chatre <reinette.chatre@...el.com>,
Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>, H Peter Anvin <hpa@...or.com>,
Babu Moger <Babu.Moger@....com>, shameerali.kolothum.thodi@...wei.com,
D Scott Phillips OS <scott@...amperecomputing.com>,
carl@...amperecomputing.com, lcherian@...vell.com,
bobo.shaobowang@...wei.com, tan.shaopeng@...itsu.com,
baolin.wang@...ux.alibaba.com, Jamie Iles <quic_jiles@...cinc.com>,
Xin Hao <xhao@...ux.alibaba.com>, peternewman@...gle.com,
dfustini@...libre.com, amitsinght@...vell.com,
David Hildenbrand <david@...hat.com>, Rex Nie <rex.nie@...uarmicro.com>,
Dave Martin <dave.martin@....com>, Koba Ko <kobak@...dia.com>,
Shanker Donthineni <sdonthineni@...dia.com>
Subject: Re: [PATCH v8 17/21] x86,fs/resctrl: Move the resctrl filesystem code
to live in /fs/resctrl
Hi, James,
This comment was buried in the middle of this huge patch.
To see my previous comment easily, I cut all other irrelevant code.
On 4/11/25 17:18, Fenghua Yu wrote:
> Hi, James,
>
> On 4/11/25 09:42, James Morse wrote:
>> Resctrl is a filesystem interface to hardware that provides cache
>> allocation policy and bandwidth control for groups of tasks or CPUs.
>>
>> To support more than one architecture, resctrl needs to live in /fs/.
>>
>> Move the code that is concerned with the filesystem interface to
>> /fs/resctrl.
>>
>> Signed-off-by: James Morse <james.morse@....com>
>> ---
>> Changes since *:
>> * This patch is generated by a script.
>> ---
>> arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 636 ---
>> arch/x86/kernel/cpu/resctrl/internal.h | 380 +-
>> arch/x86/kernel/cpu/resctrl/monitor.c | 902 +---
>> arch/x86/kernel/cpu/resctrl/monitor_trace.h | 18 +-
>> arch/x86/kernel/cpu/resctrl/pseudo_lock.c | 1080 +---
>> .../kernel/cpu/resctrl/pseudo_lock_trace.h | 2 +
>> arch/x86/kernel/cpu/resctrl/rdtgroup.c | 4556 +----------------
>> fs/resctrl/ctrlmondata.c | 660 +++
>> fs/resctrl/internal.h | 442 ++
>> fs/resctrl/monitor.c | 932 ++++
>> fs/resctrl/monitor_trace.h | 33 +
>> fs/resctrl/pseudo_lock.c | 1115 ++++
>> fs/resctrl/pseudo_lock_trace.h | 17 +
>> fs/resctrl/rdtgroup.c | 4313 ++++++++++++++++
>> 14 files changed, 7668 insertions(+), 7418 deletions(-)
[SNIP]
>> diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c
>> b/arch/x86/kernel/cpu/resctrl/rdtgroup.c
>> index 326b3048d728..c7a7f0ae373a 100644
>> --- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c
>> +++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c
[SNIP]
>> -static int mkdir_rdt_prepare(struct kernfs_node *parent_kn,
>> - const char *name, umode_t mode,
>> - enum rdt_group_type rtype, struct rdtgroup **r)
>> -{
>> - struct rdtgroup *prdtgrp, *rdtgrp;
>> - unsigned long files = 0;
>> - struct kernfs_node *kn;
>> - int ret;
>> -
>> - prdtgrp = rdtgroup_kn_lock_live(parent_kn);
>> - if (!prdtgrp) {
>> - ret = -ENODEV;
>> - goto out_unlock;
>> - }
>> -
>> - /*
>> - * Check that the parent directory for a monitor group is a
>> - * "mon_groups" directory.
The follow is my previous original comment on the merge conflict and the
fix:
> Due to the slight difference between here and the upstream commit
> 45c2e30bbd64 ("x86/resctrl: Fix rdtgroup_mkdir()'s unlocked use of
> kernfs_node::name"), merge conflicts.
>
> You may consider to add the following patch in patch #17 to fix the
> conflict?
>
> /*
> - * Check that the parent directory for a monitor group is a
> "mon_groups"
> - * directory.
> + * Check that the parent directory for a monitor group is a
> + * "mon_groups" directory.
> */
>
[SNIP]
Thanks.
-Fenghua
Powered by blists - more mailing lists