[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8e96f411-14ac-4d41-82b4-e3076f1c13f1@amd.com>
Date: Thu, 19 Dec 2024 13:45:43 -0600
From: "Moger, Babu" <bmoger@....com>
To: Reinette Chatre <reinette.chatre@...el.com>,
"Luck, Tony" <tony.luck@...el.com>, Babu Moger <babu.moger@....com>
Cc: "corbet@....net" <corbet@....net>, "tglx@...utronix.de"
<tglx@...utronix.de>, "mingo@...hat.com" <mingo@...hat.com>,
"bp@...en8.de" <bp@...en8.de>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
"peternewman@...gle.com" <peternewman@...gle.com>,
"Yu, Fenghua" <fenghua.yu@...el.com>, "x86@...nel.org" <x86@...nel.org>,
"hpa@...or.com" <hpa@...or.com>, "paulmck@...nel.org" <paulmck@...nel.org>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"thuth@...hat.com" <thuth@...hat.com>,
"rostedt@...dmis.org" <rostedt@...dmis.org>,
"xiongwei.song@...driver.com" <xiongwei.song@...driver.com>,
"pawan.kumar.gupta@...ux.intel.com" <pawan.kumar.gupta@...ux.intel.com>,
"daniel.sneddon@...ux.intel.com" <daniel.sneddon@...ux.intel.com>,
"jpoimboe@...nel.org" <jpoimboe@...nel.org>,
"perry.yuan@....com" <perry.yuan@....com>, "Huang, Kai"
<kai.huang@...el.com>, "Li, Xiaoyao" <xiaoyao.li@...el.com>,
"seanjc@...gle.com" <seanjc@...gle.com>, "Li, Xin3" <xin3.li@...el.com>,
"andrew.cooper3@...rix.com" <andrew.cooper3@...rix.com>,
"ebiggers@...gle.com" <ebiggers@...gle.com>,
"mario.limonciello@....com" <mario.limonciello@....com>,
"james.morse@....com" <james.morse@....com>,
"tan.shaopeng@...itsu.com" <tan.shaopeng@...itsu.com>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Wieczor-Retman, Maciej" <maciej.wieczor-retman@...el.com>,
"Eranian, Stephane" <eranian@...gle.com>
Subject: Re: [PATCH v10 16/24] x86/resctrl: Add interface to the assign
counter
Hi Reinette,
On 12/18/2024 4:01 PM, Reinette Chatre wrote:
>
>
> On 12/13/24 8:54 AM, Moger, Babu wrote:
>> On 12/13/2024 10:24 AM, Luck, Tony wrote:
>>>> It is right thing to continue assignment if one of the domain is out of
>>>> counters. In that case how about we save the error(say error_domain) and
>>>> continue. And finally return success if both ret and error_domain are zeros.
>>>>
>>>> return ret ? ret : error_domain:
>>>
>>> If there are many domains, then you might have 3 succeed and 5 fail.
>>>
>>> I think the best you can do is return success if everything succeeded
>>> and an error if any failed.
>>
>> Yes. The above check should take care of this case.
>>
>
> If I understand correctly "error_domain" can capture the ID of
> a single failing domain. If there are multiple failing domains like
> in Tony's example then "error_domain" will not be accurate and thus
> can never be trusted. Instead of a single check of a failure user
> space is then forced to parse the more complex "mbm_assign_control"
> file to learn what succeeded and failed.
>
> Would it not be simpler to process sequentially and then fail on
> first error encountered with detailed error message? With that
> user space can determine exactly which portion of request
> succeeded and which portion failed.
One more option is to print the error for each failure and continue. And
finally return error.
"Group mon1, domain:1 Out of MBM counters"
We have the error information as well as the convenience of assignment
on domains where counters are available when user is working with
"*"(all domains).
Note: I will be out of office starting next week Until Jan 10.
>
>>>
>>> You have the same issue if someone tries to update multiple things
>>> with a single write to mbm_assign_control:
>>>
>>> # cat > mbm_assign_control << EOF
>>> c1/m78/0=t;1=l;
>>> c1/m79/0=t;1=l
>>> c1/m80/0=t;1=l;
>>> c1/m81/0=t;1=l;
>>> EOF
>>>
>>> Those get processed in order, some may succeed, but once a domain
>>> is out of counters the rest for that domain will fail.
>>
>> Yes. I see the similar type of processing for schemata.
>> It is processed sequentially. If one fails, it returns immediately.
>>
>> ret = rdtgroup_parse_resource(resname, tok, rdtgrp);
>> if (ret)
>> goto out;
>>
>> I feel it is ok to keep same level of processing.
>>
>
> resctrl also does sequential processing when, for example, the user requests
> move of several tasks. resctrl returns with failure right away with error message
> containing failing PID. This gives clear information to user what
> portion of request succeeded without requiring user space to
> do additional queries.
>
>
> Reinette
>
Powered by blists - more mailing lists