lkml.org 
[lkml]   [2023]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v6 06/24] x86/resctrl: Access per-rmid structures by index
On 2023-09-14 at 17:21:20 +0000, James Morse wrote:
>diff --git a/arch/x86/kernel/cpu/resctrl/monitor.c b/arch/x86/kernel/cpu/resctrl/monitor.c
>index 42b9a694fe2f..be0b7cb6e1f5 100644
>--- a/arch/x86/kernel/cpu/resctrl/monitor.c
>+++ b/arch/x86/kernel/cpu/resctrl/monitor.c
>@@ -150,12 +150,29 @@ static inline u64 get_corrected_mbm_count(u32 rmid, unsigned long val)
> return val;
> }
>
>-static inline struct rmid_entry *__rmid_entry(u32 closid, u32 rmid)
>+/*
>+ * x86 and arm64 differ in their handling of monitoring.
>+ * x86's RMID are an independent number, there is only one source of traffic

"are an independent number" -> "is an independent number"
or
"are an independent number" -> "are independent numbers"?

>+ * with an RMID value of '1'.
>+ * arm64's PMG extend the PARTID/CLOSID space, there are multiple sources of

"extend" -> "extends"?

>+ * traffic with a PMG value of '1', one for each CLOSID, meaning the RMID
>+ * value is no longer unique.
>+ * To account for this, resctrl uses an index. On x86 this is just the RMID,
>+ * on arm64 it encodes the CLOSID and RMID. This gives a unique number.
>+ *
>+ * The domain's rmid_busy_llc and rmid_ptrs[] are sized by index. The arch code
>+ * must accept an attempt to read every index.
>+ */
>+static inline struct rmid_entry *__rmid_entry(u32 idx)
> {
> struct rmid_entry *entry;

--
Kind regards
Maciej Wieczór-Retman

\
 
 \ /
  Last update: 2023-10-24 11:30    [W:0.650 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site