[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <629a1728-cdbe-466d-8057-ef308f9168c7@arm.com>
Date: Thu, 24 Apr 2025 18:08:46 +0100
From: James Morse <james.morse@....com>
To: Fenghua Yu <fenghuay@...dia.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 Fenghua,
On 15/04/2025 00:21, Fenghua Yu wrote:
> This comment was buried in the middle of this huge patch.
>
> To see my previous comment easily, I cut all other irrelevant code.
(please do this as a matter of course! Anyone who needs more context can look at the
previous message)
> On 4/11/25 17:18, Fenghua Yu wrote:
>> 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.
>>> 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.
>> */
This patch is generated by the python script that I previously posted - it will make these
changes when I rebase over the upstream'd version of patch 1.
Thanks,
James
Powered by blists - more mailing lists