[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aeeb6edf-f34d-03c8-a8a5-6e8e79567936@arm.com>
Date: Fri, 28 Jul 2023 17:35:20 +0100
From: James Morse <james.morse@....com>
To: Reinette Chatre <reinette.chatre@...el.com>, x86@...nel.org,
linux-kernel@...r.kernel.org
Cc: Fenghua Yu <fenghua.yu@...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,
xingxin.hx@...nanolis.org, baolin.wang@...ux.alibaba.com,
Jamie Iles <quic_jiles@...cinc.com>,
Xin Hao <xhao@...ux.alibaba.com>, peternewman@...gle.com,
dfustini@...libre.com
Subject: Re: [PATCH v4 08/24] x86/resctrl: Allocate the cleanest CLOSID by
searching closid_num_dirty_rmid
Hi Reinette,
On 6/15/23 23:09, Reinette Chatre wrote:
> On 5/25/2023 11:01 AM, James Morse wrote:
>> diff --git a/arch/x86/kernel/cpu/resctrl/monitor.c b/arch/x86/kernel/cpu/resctrl/monitor.c
>> index 1e7fa40ee471..128d4c7206e4 100644
>> --- a/arch/x86/kernel/cpu/resctrl/monitor.c
>> +++ b/arch/x86/kernel/cpu/resctrl/monitor.c
>> @@ -379,6 +379,51 @@ static struct rmid_entry *resctrl_find_free_rmid(u32 closid)
>> return ERR_PTR(-ENOSPC);
>> }
>>
>> +/**
>> + * resctrl_find_cleanest_closid() - Find a CLOSID where all the associated
>> + * RMID are clean, or the CLOSID that has
>> + * the most clean RMID.
>> + *
>> + * MPAM's equivalent of RMID are per-CLOSID, meaning a freshly allocated CLOSID
>> + * may not be able to allocate clean RMID. To avoid this the allocator will
>> + * choose the CLOSID with the most clean RMID.
>> + *
>> + * When the CLOSID and RMID are independent numbers, the first free CLOSID will
>> + * be returned.
>> + *
>> + * Call when CONFIG_RESCTRL_RMID_DEPENDS_ON_CLOSID is defined. If not, call
>> + * resctrl_closid_alloc_first_free() instead.
>
> I was not able to find where resctrl_closid_alloc_first_free() is introduced.
Oops, this was the name for the other half of closid_alloc() back when I thought it was more
readable to give it a name. The version posted leaves it alone to reduce the churn. I'll drop this paragraph.
Thanks,
James
Powered by blists - more mailing lists