More efficient TLB-flush filtering in alloc_heap_pages().
authorKeir Fraser <keir@xen.org>
Mon, 15 Oct 2012 15:38:11 +0000 (16:38 +0100)
committerKeir Fraser <keir@xen.org>
Mon, 15 Oct 2012 15:38:11 +0000 (16:38 +0100)
commita902c12ee45fc9389eb8fe54eeddaf267a555c58
tree29c97ff4afa2b3166d240a5653f21af03660dba5
parentbe522c694af0f39dcd22f01d3c9417ce38f97a99
More efficient TLB-flush filtering in alloc_heap_pages().

Rather than per-cpu filtering for every page in a super-page
allocation, simply remember the most recent TLB timestamp across all
allocated pages, and filter on that, just once, at the end of the
function.

For large-CPU systems, doing 2MB allocations during domain creation,
this cuts down the domain creation time *massively*.

TODO: It may make sense to move the filtering out into some callers,
such as memory.c:populate_physmap() and
memory.c:increase_reservation(), so that the filtering can be moved
outside their loops, too.

Signed-off-by: Keir Fraser <keir@xen.org>
xen/common/page_alloc.c