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

Re: [PATCH v4 07/11] xen: add cache coloring allocator for domains


  • To: Carlo Nonato <carlo.nonato@xxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 24 Jan 2023 17:50:31 +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=w1SDZM9HfMDUigcz3g1sserzlTschR/KNnXVvv9LD/U=; b=X0ZDOs/bjPWHLNVchvU2wrEGkCZHrU57vlkLzvPA2bZiQ59pIiGXsEnzcXDZaleOsAYKFdNe4FwVzETkfCe1QLrOEnWOJY/bB2Wdwxo+nPoYWK8ha5YSGEzADqjVYa6j+f4er/CVj+Xhd4tUPJms3knEXxhB31LL2HNVdkSDipROW1ZmcNouo2KFahRHuKO6uGqCkGrcwFTxrgCoFWaTa36UvkyqV59uOXwxc5vNf/lj1mZLCnNMytJdMyM7UmOXimhfNd4TxShaTlK0Pw0fmKWJw9HbxD7CM9+kIwLqh9jKEHiVp8zBlYy23YJGBn5dUcSS8i5LF+WL9PUbDvJgWw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d0b8LG/XPKh9qDfmONdxeiEIazWoA5Iypz4/1tiN0ChxSAIOwO9siaq9sqcQ+y/ESLN6Hi3LUoiCt6MIjteMU1BTOgpSizJLZJ3qP21eu6J3xfmyX3/2T/I/OOdxLLUSGmr29TnAAwfN2X15LKpNPLaxgJrny2s9KUUlGyWfK9gmMeUGxha3ORsPrjXSkWbzcdtvxVL4sH8FVVX6nwXKlKlkk8lpLhFj9YxkL+QF1AHJ9vFF266n7ubeDbmZJJtF/GwcGumIMmwVt40Gy0y/ml8EeORioBGtPQx5Ts2ABvXflAf+ciBcJB5nFkKqKh9WLDnJWkigV9r7FOovtgkwwA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Luca Miccio <lucmiccio@xxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Marco Solieri <marco.solieri@xxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 24 Jan 2023 16:51:01 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 23.01.2023 16:47, Carlo Nonato wrote:
> From: Luca Miccio <lucmiccio@xxxxxxxxx>
> 
> This commit adds a new memory page allocator that implements the cache
> coloring mechanism. The allocation algorithm follows the given domain color
> configuration and maximizes contiguity in the page selection of multiple
> subsequent requests.
> 
> Pages are stored in a color-indexed array of lists, each one sorted by
> machine address, that is referred to as "colored heap". Those lists are
> filled by a simple init function which computes the color of each page.
> When a domain requests a page, the allocator takes one from those lists
> whose colors equals the domain configuration. It chooses the page with the
> lowest machine address such that contiguous pages are sequentially
> allocated if this is made possible by a color assignment which includes
> adjacent colors.

What use is this with ...

> The allocator can handle only requests with order equal to 0 since the
> single color granularity is represented in memory by one page.

... this restriction? Plus aiui there's no guarantee of contiguous pages
coming back in any event (because things depend on what may have been
allocated / freed earlier on), so why even give the impression of there
being a way to obtain contiguous pages?

Jan



 


Rackspace

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