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

Re: [RFC PATCH] xen/common: cache colored buddy allocator for domains


  • To: Carlo Nonato <carlo.nonato@xxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 7 Dec 2022 12:52:23 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0ajysnE3BKNpAVI201jl8o5QZOBMmIPAaJcGcfOItTo=; b=U9v9lDJc0vlNm3ys+psGvuUDpQw2Vj5Rv1S/Dg/I36l10nJV/ry/RpuCI11ni2cZpF9xtqgQvVxlShJNNc41y5fDpF/1W+F7ERT1ao8thRGCb3X8+uQeHj/pHPzgb6i9DxFGYMRFZa1T/+5UNI6DctVE7f2Pn3eFuOcNUw+08AoGSylZjZUc2LPYYEgM5Y0EhM4bPl/nErnSu4ghZuprufwCOAdLoYHwqLJs42Bo0mJITkmB7dV0xgHFOQRIrBHCsWwVveFpiprTcy9+DzGEj01GgHESZpmqK9vcXd67emUsifMt2VcRQajO5K3sMac/fMgHHikafXKkopzKnkmUvA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ibFLcO6L2Nt5hN84WozKbD8lgmNGN96tzPqf9eLQhiBANGecRlzZ+nXGyWANH3+2zgBXUQ+hZMITLvo+QgipVT4lKOkQrVRJOLgW1RjzqHYwp1B+v1gULqgNOUZKaM3wKFXONXB/NpA0TMC0EjbIBwtJqIzIjSchuDrEMgiLAsDI/eeZehkhDQvI5n1IN0VWvQsUaTNNjABdd2Di2TqXUZtqVSU5/3MEwxUo+hiD1XRac3c6adi7azMBllvLC/KZ/N8blloYZj2RT7/9yyS5PAPNTuIJrfolCjNPVmHBz4LG95A0YZGknQDLlIeiGjo/MbIgcu2f/8pV2OcBX+yzlA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: marco.solieri@xxxxxxxxxx, andrea.bastoni@xxxxxxxxxxxxxxx, lucmiccio@xxxxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 07 Dec 2022 11:52:35 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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



 


Rackspace

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