[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v3 7/7] mm: allow page scrubbing routine(s) to be arch controlled
Hi Jan, On 26/11/2024 08:02, Jan Beulich wrote: On 25.11.2024 23:17, Julien Grall wrote:--- a/xen/arch/arm/include/asm/page.h +++ b/xen/arch/arm/include/asm/page.h @@ -144,6 +144,12 @@ extern size_t dcache_line_bytes;#define copy_page(dp, sp) memcpy(dp, sp, PAGE_SIZE) +#define clear_page_hot clear_page+#define clear_page_cold clear_page + +#define scrub_page_hot(page) memset(page, SCRUB_BYTE_PATTERN, PAGE_SIZE) +#define scrub_page_cold scrub_page_hotThis block seems to be common between all the arch but x86. Should we add an header in asm generic?I'd say that largely depends on the intentions of Arm, RISC-V, and PPC. Personally I've always found it odd that memset() / memcpy() are used for page clearing / copying. Surely there are better ways, and pretty certainly about every arch also has distinct means to efficiently do "hot" and "cold" clearing. Therefore keeping these #define-s in per-arch headers imo serves as a reminder that something wants doing about them. Fair enough. For the code: Acked-by: Julien Grall <jgrall@xxxxxxxxxx> Cheers, -- Julien Grall
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |