All of lore.kernel.org
 help / color / mirror / Atom feed
* [For Xen-4.10 RFC PATCH 0/3] Reduce unnecessary icache maintenance operations
@ 2017-03-31 10:24 Punit Agrawal
  2017-03-31 10:24 ` [For Xen-4.10 RFC PATCH 1/3] Allow control of icache invalidations when calling flush_page_to_ram() Punit Agrawal
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Punit Agrawal @ 2017-03-31 10:24 UTC (permalink / raw)
  To: xen-devel
  Cc: sstabellini, wei.liu2, George.Dunlap, andrew.cooper3,
	Punit Agrawal, tim, julien.grall, jbeulich, ian.jackson

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(-)

-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-05-12 12:35 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-31 10:24 [For Xen-4.10 RFC PATCH 0/3] Reduce unnecessary icache maintenance operations Punit Agrawal
2017-03-31 10:24 ` [For Xen-4.10 RFC PATCH 1/3] Allow control of icache invalidations when calling flush_page_to_ram() Punit Agrawal
2017-03-31 23:53   ` Stefano Stabellini
2017-03-31 10:24 ` [For Xen-4.10 RFC PATCH 2/3] arm: p2m: Prevent redundant icache flushes Punit Agrawal
2017-03-31 23:54   ` Stefano Stabellini
2017-04-03 10:45     ` Punit Agrawal
2017-03-31 10:24 ` [For Xen-4.10 RFC PATCH 3/3] Prevent redundant icache flushes in populate_physmap() Punit Agrawal
2017-03-31 11:34   ` Wei Liu
2017-03-31 13:53     ` Punit Agrawal
2017-03-31 14:10       ` Wei Liu
2017-03-31 14:27         ` Punit Agrawal
2017-03-31 23:58         ` Stefano Stabellini
2017-05-09 15:16   ` Julien Grall
2017-05-12 12:35     ` Punit Agrawal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.