Skip to content

RFC Reduce unnecessary icache maintenance operations

Punit Agrawal xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3Allow control of icache invalidations when calling flush_page_to_ram()xen/arch/arm/mm.c xen/arch/arm/p2m.c xen/common/page_alloc.c +2 more+7 -61 reply
2/3arm: p2m: Prevent redundant icache flushesxen/arch/arm/p2m.c+3 -12 replies
3/3Prevent redundant icache flushes in populate_physmap()xen/common/memory.c xen/common/page_alloc.c xen/include/asm-x86/page.h +1 more+13 -17 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchStefano Stabellini
1/3
2/3R-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [For Xen-4.10 RFC PATCH 0/3] Reduce unnecessary icache maintenance operations

Hi,

Although icache maintenance operations are required when changing page table mappings, in certain situations they are being called far more frequently than necessary.

As icache maintenance has a performance penalty, one that increases with the number of cores in the system, this RFC attempts to improve the situation by hoisting knowledge of required icache maintenance operations to higher layers.

Patch 1 adds a parameter to flush_page_to_ram() to prevent performing icache maintenance per page. Current calls to flush_page_to_ram() loop over pages and performing a full icache flush for each page is excessive.

Patch 2 hoists icache maintenance from flush_page_to_ram() to p2m_cache_flush().

Patch 3 introduces a new MEMF_ flag to indicate to alloc_heap_pages() that icache maintenance will be performed by the caller. The icache maintenance operations are performed in populate_physmap(). As I couldn't icache maintenance operations for x86, an empty helper is introduced.

Is it reasonable to move cache maintenance operation to higher layers? The alternative would be perform cache maintenance operations on ranges larger than page size but the benefit (reduced icache operations) might not be equivalent.

This is my first contribution to Xen, so please go gentle if I've missed something obvious.

Thanks,
Punit

Punit Agrawal (3):
Allow control of icache invalidations when calling flush_page_to_ram()
arm: p2m: Prevent redundant icache flushes
Prevent redundant icache flushes in populate_physmap()

 xen/arch/arm/mm.c              | 5 +++--
 xen/arch/arm/p2m.c             | 4 +++-
 xen/common/memory.c            | 6 ++++++
 xen/common/page_alloc.c        | 2 +-
 xen/include/asm-arm/page.h     | 2 +-
 xen/include/asm-x86/flushtlb.h | 2 +-
 xen/include/asm-x86/page.h     | 4 ++++
 xen/include/xen/mm.h           | 2 ++
 8 files changed, 21 insertions(+), 6 deletions(-)
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel