From: James Morse <james.morse@arm.com>
To: Rex Nie <rex.nie@jaguarmicro.com>
Cc: fenghua.yu@intel.com, reinette.chatre@intel.com,
rohit.mathew@arm.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fs/resctrl: Uniform data type of component_id/domid/id/cache_id
Date: Mon, 11 Mar 2024 17:54:52 +0000 [thread overview]
Message-ID: <e731b262-c201-4294-9b1e-abfa0c6ac817@arm.com> (raw)
In-Reply-To: <20240311081839.937-1-rex.nie@jaguarmicro.com>
Hi Rex Nie,
(for those following along at home - this is a patch against the MPAM tree, not mainline)
On 11/03/2024 08:18, Rex Nie wrote:
> This patch uniform data type of component_id/domid/id/cache_id to
> u32 to avoid type confusion. According to ACPI for mpam, cache id
> is used as locator for cache MSC. Reference to RD_PPTT_CACHE_ID
> definition from edk2-platforms, u32 is enough for cache_id.
>
> ( \
> (((PackageId) & 0xF) << 20) | (((ClusterId) & 0xFF) << 12) | \
> (((CoreId) & 0xFF) << 4) | ((CacheType) & 0xF) \
> )
Aha, this is where those numbers are coming from! Thanks for digging that out.
> refs:
> 1. ACPI for mpam: https://developer.arm.com/documentation/den0065/latest/
> 2. RD_PPTT_CACHE_ID from edk2-platforms: https://github.com/tianocore/edk2-platforms/blob/master/Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h#L202
Just to check - you don't see any side effects from doing this, its just cleaner.
I agree - today this is only an int because that's what it is in struct rdt_domain.
> diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h
> index dd34523469a5..b00a89addf91 100644
> --- a/include/linux/resctrl.h
> +++ b/include/linux/resctrl.h
> @@ -108,7 +108,7 @@ struct resctrl_staged_config {
> */
> struct rdt_domain {
> struct list_head list;
> - int id;
> + u32 id;
> struct cpumask cpu_mask;
> unsigned long *rmid_busy_llc;
> struct mbm_state *mbm_total;
We should probably only make this change if we clean this up in restrl, not just the MPAM
driver.
I'll pick the MPAM bits of this up for the MPAM tree. This will eventually get merged with
the patch that adds the original code as there is no point preserving the history of code
that isn't merged yet. I'll add you to 'CC' of those patches. (The joke is 'CC' also
stands for Celebrate Contribution!)
Thanks!
James
next prev parent reply other threads:[~2024-03-11 17:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-11 8:18 Rex Nie
2024-03-11 17:54 ` James Morse [this message]
2024-03-12 2:52 ` 答复: " Rex Nie
2024-03-18 17:32 ` James Morse
2024-03-19 3:21 ` 答复: " Rex Nie
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=e731b262-c201-4294-9b1e-abfa0c6ac817@arm.com \
--to=james.morse@arm.com \
--cc=fenghua.yu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=reinette.chatre@intel.com \
--cc=rex.nie@jaguarmicro.com \
--cc=rohit.mathew@arm.com \
/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®