]> xenbits.xensource.com Git - xen.git/commit
spread boot time page scrubbing across all available CPU's
authorMalcolm Crossley <malcolm.crossley@citrix.com>
Mon, 16 Jun 2014 10:02:00 +0000 (12:02 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 16 Jun 2014 10:02:00 +0000 (12:02 +0200)
commit7430a86de0c9bd126b441570e459f6e06413cbf6
tree77df675126277ffe29dc56aff36c95ef1431ee51
parent323338f86fb6cd6f6dba4f59a84eed71b3552d21
spread boot time page scrubbing across all available CPU's

The page scrubbing is done in 128MB chunks in lockstep across all the
non-SMT CPU's. This allows for the boot CPU to hold the heap_lock whilst each
chunk is being scrubbed and then release the heap_lock when the CPU's are
finished scrubing their individual chunk. This allows for the heap_lock to
not be held continously and for pending softirqs are to be serviced
periodically across the CPU's.

The page scrub memory chunks are allocated to the CPU's in a NUMA aware
fashion to reduce socket interconnect overhead and improve performance.
Specifically in the first phase we scrub at the same time on all the
NUMA nodes that have CPUs - we also weed out the SMT threads so that
we only use cores (that gives a 50% boost). The second phase is for NUMA
nodes that have no CPUs - for that we use the closest NUMA node's CPUs
(non-SMT again) to do the job.

This patch reduces the boot page scrub time on a 128GB 64 core AMD Opteron
6386 machine from 49 seconds to 3 seconds.
On a IvyBridge-EX 8 socket box with 1.5TB it cuts it down from 15 minutes
to 63 seconds.

Signed-off-by: Malcolm Crossley <malcolm.crossley@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Tim Deegan <tim@xen.org>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
docs/misc/xen-command-line.markdown
xen/common/page_alloc.c
xen/include/asm-arm/numa.h