On 04.03.2022 18:46, Marco Solieri wrote:
> From: Luca Miccio <[email protected]>
> 
> 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 <[email protected]>
> Signed-off-by: Marco Solieri <[email protected]>
> ---
>  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


Reply via email to