On 22.10.2022 18:08, Carlo Nonato wrote: > This commit replaces the colored allocator for domains with a simple buddy > allocator indexed also by colors, so that it can allocate pages based on > some coloring configuration. > > It applies on top of Arm cache coloring (v3) as sent to the mailing list. > > This has two benefits: > - order can now be greater than 0 if the color config contains a > sufficient number of adjacent colors starting from an order aligned > one;
But still not large enough to reach the order needed for large page mappings, aiui? > - same benefits of the normal buddy: constant time alloc and free > (constant with respect to the number of pages, not for the number of > colors); > > But also one "big" cons: > - given the way Xen queries the allocator, it can only serve larger pages > first and only when a domain runs out of those, it can go with the smaller > ones. Let's say that domain 0 has 31 colors out of 32 total (0-30 out of > 0-31). The order-4 pages (0-15) are allocated first and then the order-3 > (16-23, since 0-7 and 8-15 are all already allocated), and then order-2 > and so on. The result is... the domain practically uses only one half of > the colors that it should. What's unclear to me is how big of a con this is, i.e. how reasonable it is for someone to configure a domain to use all except one of the colors (and not, say, half of them). Jan
