| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
 Re: [PATCH 08/36] xen/arm: add colored flag to page struct
 
To: Marco Solieri <marco.solieri@xxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxxFrom: Julien Grall <julien@xxxxxxx>Date: Fri, 4 Mar 2022 20:13:32 +0000Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Marco Solieri <marco.solieri@xxxxxxxxxx>, Andrea Bastoni <andrea.bastoni@xxxxxxxxxxxxxxx>, Luca Miccio <lucmiccio@xxxxxxxxx>Delivery-date: Fri, 04 Mar 2022 20:13:49 +0000List-id: Xen developer discussion <xen-devel.lists.xenproject.org> 
 
Hi,
On 04/03/2022 17:46, Marco Solieri wrote:
 
From: Luca Miccio <lucmiccio@xxxxxxxxx>
A new allocator enforcing a cache-coloring configuration is going to be
introduced.  We thus need to distinguish the memory pages assigned to,
and managed by, such colored allocator from the ordinary buddy
allocator's ones.  Add a color flag to the page structure.
Signed-off-by: Luca Miccio <lucmiccio@xxxxxxxxx>
Signed-off-by: Marco Solieri <marco.solieri@xxxxxxxxxxxxxxx>
---
  xen/arch/arm/include/asm/mm.h | 4 ++++
  1 file changed, 4 insertions(+)
diff --git a/xen/arch/arm/include/asm/mm.h b/xen/arch/arm/include/asm/mm.h
index 487be7cf59..9ac1767595 100644
--- a/xen/arch/arm/include/asm/mm.h
+++ b/xen/arch/arm/include/asm/mm.h
@@ -88,6 +88,10 @@ struct page_info
           */
          u32 tlbflush_timestamp;
      };
+
+    /* Is page managed by the cache-colored allocator? */
+    bool colored;
 
struct page_info is going to be used quite a lot. In fact, there is one 
per RAM page. So we need to avoid growing the structure. 
For Arm64, there is a 4 bytes padding here. But for arm32, there are 
none. So the size will increase by another 8 bytes. 
In this case, I would use a bit in count_info.
Cheers,
--
Julien Grall
 
 |