From: "Moger, Babu" <babu.moger@amd.com>
To: Reinette Chatre <reinette.chatre@intel.com>,
corbet@lwn.net, tony.luck@intel.com, Dave.Martin@arm.com,
james.morse@arm.com, tglx@linutronix.de, mingo@redhat.com,
bp@alien8.de, dave.hansen@linux.intel.com
Cc: x86@kernel.org, hpa@zytor.com, akpm@linux-foundation.org,
paulmck@kernel.org, rostedt@goodmis.org, thuth@redhat.com,
ardb@kernel.org, gregkh@linuxfoundation.org, seanjc@google.com,
thomas.lendacky@amd.com, pawan.kumar.gupta@linux.intel.com,
perry.yuan@amd.com, yosry.ahmed@linux.dev, kai.huang@intel.com,
xiaoyao.li@intel.com, peterz@infradead.org,
kan.liang@linux.intel.com, mario.limonciello@amd.com,
xin3.li@intel.com, sohil.mehta@intel.com,
chang.seok.bae@intel.com, andrew.cooper3@citrix.com,
ebiggers@google.com, ak@linux.intel.com, xin@zytor.com,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 3/8] x86/resctrl: Detect io_alloc feature
Date: Wed, 18 Jun 2025 14:27:13 -0500 [thread overview]
Message-ID: <58ea6834-7765-434f-8d25-ea71e1f2d5e4@amd.com> (raw)
In-Reply-To: <053a6879-f069-4073-a96f-dfacd7673d1f@intel.com>
Hi Reinette,
On 6/17/25 22:45, Reinette Chatre wrote:
> Hi Babu,
>
> Please modify subject prefix to "x86,fs/resctrl" since this adds new arch
> API called by resctrl fs.
Sure.
>
> On 6/11/25 2:23 PM, Babu Moger wrote:
>> Smart Data Cache Injection (SDCI) is a mechanism that enables direct
>> insertion of data from I/O devices into the L3 cache. It can the demands
>
> "It can the demands" -> "It can reduce demands"?
Sure.
>
>> on DRAM bandwidth and reduces latency to the processor consuming the I/O
>> data.
>>
>> Introduce cache resource property "io_alloc_capable" that an architecture
>> can set if a portion of the L3 cache can be allocated for I/O traffic.
>
> I think "L3" should be dropped because the cache resource property is not
> unique to L3. It is a property of all cache resources.
>
>> Set this property on x86 systems that support SDCIAE (L3 Smart Data Cache
>> Injection Allocation Enforcement).
>
> Here it can be mentioned that this property is only set for the L3 cache
> resource on systems that supports SDCIAE.
>
>>
>> Signed-off-by: Babu Moger <babu.moger@amd.com>
>> ---
>> v6: No changes.
>>
>> v5: No changes.
>>
>> v4: Updated the commit message and code comment based on feedback.
>>
>> v3: Rewrote commit log. Changed the text to bit generic than the AMD specific.
>> Renamed the rdt_get_sdciae_alloc_cfg() to rdt_set_io_alloc_capable().
>> Removed leftover comment from v2.
>>
>> v2: Changed sdciae_capable to io_alloc_capable to make it generic feature.
>> Also moved the io_alloc_capable in struct resctrl_cache.
>> ---
>> arch/x86/kernel/cpu/resctrl/core.c | 7 +++++++
>> include/linux/resctrl.h | 3 +++
>> 2 files changed, 10 insertions(+)
>>
>> diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c
>> index 326c679ade5c..a3d174362249 100644
>> --- a/arch/x86/kernel/cpu/resctrl/core.c
>> +++ b/arch/x86/kernel/cpu/resctrl/core.c
>> @@ -274,6 +274,11 @@ static void rdt_get_cdp_config(int level)
>> rdt_resources_all[level].r_resctrl.cdp_capable = true;
>> }
>>
>> +static void rdt_set_io_alloc_capable(struct rdt_resource *r)
>> +{
>> + r->cache.io_alloc_capable = true;
>> +}
>> +
>> static void rdt_get_cdp_l3_config(void)
>> {
>> rdt_get_cdp_config(RDT_RESOURCE_L3);
>> @@ -840,6 +845,8 @@ static __init bool get_rdt_alloc_resources(void)
>> rdt_get_cache_alloc_cfg(1, r);
>> if (rdt_cpu_has(X86_FEATURE_CDP_L3))
>> rdt_get_cdp_l3_config();
>> + if (rdt_cpu_has(X86_FEATURE_SDCIAE))
>> + rdt_set_io_alloc_capable(r);
>> ret = true;
>> }
>> if (rdt_cpu_has(X86_FEATURE_CAT_L2)) {
>> diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h
>> index 9ba771f2ddea..0e8641e41100 100644
>> --- a/include/linux/resctrl.h
>> +++ b/include/linux/resctrl.h
>> @@ -191,6 +191,8 @@ struct rdt_mon_domain {
>> * @arch_has_sparse_bitmasks: True if a bitmask like f00f is valid.
>> * @arch_has_per_cpu_cfg: True if QOS_CFG register for this cache
>> * level has CPU scope.
>> + * @io_alloc_capable: True if portion of the cache can be allocated
>> + * for I/O traffic.
>
> Reading this again I think the description can be improved since technically
> resctrl does not allocate a portion of cache but instead configures the
> portion of cache that device can allocate into.
> So perhaps this can be: "True if portion of the cache can be configured
> for I/O traffic allocation."
Sure.
>
>> */
>> struct resctrl_cache {
>> unsigned int cbm_len;
>> @@ -198,6 +200,7 @@ struct resctrl_cache {
>> unsigned int shareable_bits;
>> bool arch_has_sparse_bitmasks;
>> bool arch_has_per_cpu_cfg;
>> + bool io_alloc_capable;
>> };
>>
>> /**
>
> Reinette
>
--
Thanks
Babu Moger
next prev parent reply other threads:[~2025-06-18 19:27 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-11 21:23 [PATCH v6 0/8] x86/resctrl: Support L3 Smart Data Cache Injection Allocation Enforcement (SDCIAE) Babu Moger
2025-06-11 21:23 ` [PATCH v6 1/8] x86/cpufeatures: Add support for L3 Smart Data Cache Injection Allocation Enforcement Babu Moger
2025-06-11 21:23 ` [PATCH v6 2/8] x86/resctrl: Add SDCIAE feature in the command line options Babu Moger
2025-06-11 21:23 ` [PATCH v6 3/8] x86/resctrl: Detect io_alloc feature Babu Moger
2025-06-18 3:45 ` Reinette Chatre
2025-06-18 19:27 ` Moger, Babu [this message]
2025-06-11 21:23 ` [PATCH v6 4/8] x86/resctrl: Implement "io_alloc" enable/disable handlers Babu Moger
2025-06-18 3:51 ` Reinette Chatre
2025-06-18 19:27 ` Moger, Babu
2025-06-18 20:32 ` Reinette Chatre
2025-06-18 21:57 ` Moger, Babu
2025-06-11 21:23 ` [PATCH v6 5/8] fs/resctrl: Add user interface to enable/disable io_alloc feature Babu Moger
2025-06-18 3:59 ` Reinette Chatre
2025-06-19 18:41 ` Moger, Babu
2025-06-20 15:53 ` Reinette Chatre
2025-06-20 21:57 ` Moger, Babu
2025-06-11 21:23 ` [PATCH v6 6/8] fs/resctrl: Introduce interface to display io_alloc CBMs Babu Moger
2025-06-18 4:01 ` Reinette Chatre
2025-06-20 21:57 ` Moger, Babu
2025-06-11 21:23 ` [PATCH v6 7/8] fs/resctrl: Modify rdt_parse_data to pass mode and CLOSID Babu Moger
2025-06-18 4:03 ` Reinette Chatre
2025-06-20 21:58 ` Moger, Babu
2025-06-11 21:23 ` [PATCH v6 8/8] fs/resctrl: Introduce interface to modify io_alloc Capacity Bit Masks Babu Moger
[not found] ` <202506131403.MWHHLsxB-lkp@intel.com>
2025-06-16 14:51 ` Moger, Babu
2025-06-18 4:03 ` Reinette Chatre
2025-06-20 21:58 ` Moger, Babu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=58ea6834-7765-434f-8d25-ea71e1f2d5e4@amd.com \
--to=babu.moger@amd.com \
--cc=Dave.Martin@arm.com \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=andrew.cooper3@citrix.com \
--cc=ardb@kernel.org \
--cc=bp@alien8.de \
--cc=chang.seok.bae@intel.com \
--cc=corbet@lwn.net \
--cc=dave.hansen@linux.intel.com \
--cc=ebiggers@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=james.morse@arm.com \
--cc=kai.huang@intel.com \
--cc=kan.liang@linux.intel.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=mingo@redhat.com \
--cc=paulmck@kernel.org \
--cc=pawan.kumar.gupta@linux.intel.com \
--cc=perry.yuan@amd.com \
--cc=peterz@infradead.org \
--cc=reinette.chatre@intel.com \
--cc=rostedt@goodmis.org \
--cc=seanjc@google.com \
--cc=sohil.mehta@intel.com \
--cc=tglx@linutronix.de \
--cc=thomas.lendacky@amd.com \
--cc=thuth@redhat.com \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
--cc=xiaoyao.li@intel.com \
--cc=xin3.li@intel.com \
--cc=xin@zytor.com \
--cc=yosry.ahmed@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®