[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aC9c_29Jz4aEtRWl@agluck-desk3>
Date: Thu, 22 May 2025 10:21:03 -0700
From: "Luck, Tony" <tony.luck@...el.com>
To: Peter Newman <peternewman@...gle.com>
Cc: "Chatre, Reinette" <reinette.chatre@...el.com>,
"Moger, Babu" <bmoger@....com>,
"babu.moger@....com" <babu.moger@....com>,
"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>,
"james.morse@....com" <james.morse@....com>,
"dave.martin@....com" <dave.martin@....com>,
"fenghuay@...dia.com" <fenghuay@...dia.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>,
"ardb@...nel.org" <ardb@...nel.org>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"daniel.sneddon@...ux.intel.com" <daniel.sneddon@...ux.intel.com>,
"jpoimboe@...nel.org" <jpoimboe@...nel.org>,
"alexandre.chartre@...cle.com" <alexandre.chartre@...cle.com>,
"pawan.kumar.gupta@...ux.intel.com" <pawan.kumar.gupta@...ux.intel.com>,
"thomas.lendacky@....com" <thomas.lendacky@....com>,
"perry.yuan@....com" <perry.yuan@....com>,
"seanjc@...gle.com" <seanjc@...gle.com>,
"Huang, Kai" <kai.huang@...el.com>,
"Li, Xiaoyao" <xiaoyao.li@...el.com>,
"kan.liang@...ux.intel.com" <kan.liang@...ux.intel.com>,
"Li, Xin3" <xin3.li@...el.com>,
"ebiggers@...gle.com" <ebiggers@...gle.com>,
"xin@...or.com" <xin@...or.com>,
"Mehta, Sohil" <sohil.mehta@...el.com>,
"andrew.cooper3@...rix.com" <andrew.cooper3@...rix.com>,
"mario.limonciello@....com" <mario.limonciello@....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>,
"Xiaojian.Du@....com" <Xiaojian.Du@....com>,
"gautham.shenoy@....com" <gautham.shenoy@....com>
Subject: Re: [PATCH v13 00/27] x86/resctrl : Support AMD Assignable Bandwidth
Monitoring Counters (ABMC)
> > Maybe assign one of the limited supply of RMIDs for these "unmonitored"
> > tasks. Populate a resctrl group named "unmonitored" that lists all the
> > unmonitored tasks in a (read-only) "tasks" file. And supply all the counts
> > for these tasks in normal looking "mon_data" directory.
>
> I needed to switch to an rdtgroup struct pointer rather than hardware
> IDs in the task structure to indicate group membership[1], otherwise
> it's not possible to determine which tasks are in a group when it
> doesn't have a unique HW ID value.
>
> Also this is required for shared assignment so that changing a group's
> IDs in a domain only requires updating running tasks rather than
> needing to search the entire task list, which would lead to the same
> problem we encountered in mongroup rename[2].
Having a pointer to the rdtgroup in the task structure does make
file system operations easier. But the cost appears to be more
complexity (and memory references) in the context switch code.
Your patch[1] seems to do some extra work outside of the static_branch
protected sections. So has a cost to context switch even if resctrl
is not in use.
Chasing pointers "closid = rgrp->mon.parent->closid;" could be
expensive when those miss in the cache.
>
> -Peter
>
> [1] https://lore.kernel.org/lkml/20240325172707.73966-5-peternewman@google.com/
> [2] https://lore.kernel.org/lkml/CALPaoCh0SbG1+VbbgcxjubE7Cc2Pb6QqhG3NH6X=WwsNfqNjtA@mail.gmail.com/
-Tony
Powered by blists - more mailing lists