[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 04/36] xen/arm: add parsing function for cache coloring configuration





On 22/03/2022 09:17, Luca Miccio wrote:
Hi Julien,

Hi Luca,

- way_size: The size of a LLC way in bytes. This value is mainly used
    to calculate the maximum available colors on the platform.

We should only add command line option when they are a strong use case.
In documentation, you wrote that someone may want to overwrite the way
size for "specific needs".

Can you explain what would be those needs?

- dom0_colors: The coloring configuration for Dom0, which also acts as
    default configuration for any DomU without an explicit configuration.
- xen_colors: The coloring configuration for the Xen hypervisor itself.

A cache coloring configuration consists of a selection of colors to be
assigned to a VM or to the hypervisor. It is represented by a set of
ranges. Add a common function that parses a string with a
comma-separated set of hyphen-separated ranges like "0-7,15-16" and
returns both: the number of chosen colors, and an array containing their
ids.
Currently we support platforms with up to 128 colors.

Is there any reason this value is hardcoded in Xen rather than part of
the Kconfig?


Not really at the time when this patch was created. But as we notify in
patch 32,
there is an assert that fails if we use a certain amount of colors. Maybe
we should
find a better way to store the color information.

You could use a bitmap. Xen already provide facilities to use them in the public interface (see xenctl_bitmap) and convert the Xen internal bitmap (see DECLARE_BITMAP).

Cheers,

--
Julien Grall



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.