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

Re: [PATCH v5 00/13] Arm cache coloring


  • To: Carlo Nonato <carlo.nonato@xxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Wed, 3 Jan 2024 14:34:41 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=minervasys.tech smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • 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=nXIH0y8c2NXSOH6MYca59Y5ms4J4oWRk9WSB63zMS4w=; b=L1XQKmqrSvSxlqkc9OjXfFfiJ50wxQ12GuL58qcGIrJ+2WtYOifN0Ft0EuFpepRY4QPxDvTkTeB0ONMDF2SZKMX9qM9VsmgjeaJztiJxDYaeGbx7SzCegJbesPZFsBDXPZuD+pVw0v7XVxAP/59GioPfZx+ta4IWXh6SFhYH5f7P/deE+pUpYwhnj0EgV0OgPHgKtOsnIgC0ssAOFhAVJdQWSxheV0iOJyd3mcWn4ErK43YGbr+cqqq32yfCp/0r5qiiX1lm38/X6HP5jl7VfNJtFPn0PygQ6PIizbA34zR3sxc8HLZnEVxdZzTqgSz7cCLWJTOuLE+M1q6ZfWx+TA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iwwP/VxVW+8Yi6tynv5X8H6up19yyDnorOh20hxlmjKEsbyaFOnuDtjvtDy/dZffxdzF9+O2b8g1UfTDygJRQem0ZQPuJvt2+ymXZFZGeD82zUH6j/C9RrchMVZIA+Ay9vzM1W5PTYBlkvjCfxX7AkoHO35C35Z61/fjv6ai54Ce3iH6sSOHzHxt1oeBEZobvEXZXKGw8Z3woQBgGvScuGvcf2+iWm0plbBn9j5a3MV7LB7FMp07OTZ5lfO3PpIoFiettC/LSMyJOzvRkCjIuGk3qo3DfXpgIXRCnoVeWsW5TA5JCVyDHCthViwmCteTMZ00yA2AOkdya7anUVkvRA==
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
  • Delivery-date: Wed, 03 Jan 2024 13:35:15 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi,

On 02/01/2024 10:51, Carlo Nonato wrote:
> 
> 
> Shared caches in multi-core CPU architectures represent a problem for
> predictability of memory access latency. This jeopardizes applicability
> of many Arm platform in real-time critical and mixed-criticality
> scenarios. We introduce support for cache partitioning with page
> coloring, a transparent software technique that enables isolation
> between domains and Xen, and thus avoids cache interference.
> 
> When creating a domain, a simple syntax (e.g. `0-3` or `4-11`) allows
> the user to define assignments of cache partitions ids, called colors,
> where assigning different colors guarantees no mutual eviction on cache
> will ever happen. This instructs the Xen memory allocator to provide
> the i-th color assignee only with pages that maps to color i, i.e. that
> are indexed in the i-th cache partition.
> 
> The proposed implementation supports the dom0less feature.
> The proposed implementation doesn't support the static-mem feature.
> The solution has been tested in several scenarios, including Xilinx Zynq
> MPSoCs.
> 
> In this patch series there are two major unacceptable workarounds for which
> I want to ask you for comments:
>  - #3: allocate_memory() has been moved in dom0less_build.c, so I just copied
>  it back to make it compile.
I would move it to domain_build.c and add a prototype in domain_build.h.
You could guard it together with allocate_bank_memory() for DOM0LESS || LLC or 
just
remove the guards (in former case, you would need to protect your call with 
#ifdef in construct_dom0()).

>  - #13: consider_modules() has been moved to arm32 only. Again I just copied 
> it.
I would move it to setup.c and add a prototype in setup.h.
As for the guards, if we want them (personally I don't see the need), you would 
need LLC || (ARM_32 && MMU).

BTW. Patchew reports some build issues in your series:
https://gitlab.com/xen-project/patchew/xen/-/pipelines/1124313980

Make sure to build test your series on different arches. You can ask on IRC to 
become a member
on gitlab so that you can trigger the pipeline by pushing the changes to your 
fork on people/<you>/xen.

~Michal



 


Rackspace

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