diff mbox series

[07/36] xen/arm: add coloring data to domains

Message ID 20220304174701.1453977-8-marco.solieri@minervasys.tech (mailing list archive)
State New, archived
Headers show
Series Arm cache coloring | expand

Commit Message

Marco Solieri March 4, 2022, 5:46 p.m. UTC
From: Luca Miccio <lucmiccio@gmail.com>

We want to be able to associate an assignment of cache colors to each
domain.  Add a configurable-length array containing a set of color
indices in the domain data.

Signed-off-by: Luca Miccio <lucmiccio@gmail.com>
Signed-off-by: Marco Solieri <marco.solieri@minervasys.tech>
---
 xen/include/xen/sched.h | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Jan Beulich March 7, 2022, 7:22 a.m. UTC | #1
On 04.03.2022 18:46, Marco Solieri wrote:
> From: Luca Miccio <lucmiccio@gmail.com>
> 
> We want to be able to associate an assignment of cache colors to each
> domain.  Add a configurable-length array containing a set of color
> indices in the domain data.
> 
> Signed-off-by: Luca Miccio <lucmiccio@gmail.com>
> Signed-off-by: Marco Solieri <marco.solieri@minervasys.tech>
> ---
>  xen/include/xen/sched.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
> index 10ea969c7a..bfbe72b3ea 100644
> --- a/xen/include/xen/sched.h
> +++ b/xen/include/xen/sched.h
> @@ -388,6 +388,10 @@ struct domain
>      atomic_t         shr_pages;         /* shared pages */
>      atomic_t         paged_pages;       /* paged-out pages */
>  
> +    /* Coloring. */
> +    uint32_t        *colors;
> +    uint32_t        max_colors;

You will want to justify why this needs to live in struct domain, and
not in struct arch_domain (as the title would suggest). You will also
want to check whether uint32_t is actually appropriate to use here -
see ./CODING_STYLE. Finally, a comment this short (and hence ambiguous)
isn't worthwhile to have, imo. It (as well as the title) doesn't even
include the word "cache".

Jan
diff mbox series

Patch

diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index 10ea969c7a..bfbe72b3ea 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -388,6 +388,10 @@  struct domain
     atomic_t         shr_pages;         /* shared pages */
     atomic_t         paged_pages;       /* paged-out pages */
 
+    /* Coloring. */
+    uint32_t        *colors;
+    uint32_t        max_colors;
+
     /* Scheduling. */
     void            *sched_priv;    /* scheduler-specific data */
     struct sched_unit *sched_unit_list;