]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
xen: allocate page for shared info page from low memory
authorJuergen Gross <jgross@suse.com>
Mon, 12 Jun 2017 11:53:56 +0000 (13:53 +0200)
committerJuergen Gross <jgross@suse.com>
Sun, 25 Jun 2017 11:11:27 +0000 (13:11 +0200)
commita5d5f328b0e2baa5ee7c119fd66324eb79eeeb66
tree7a56d9ab6a01a47a8b758f90b5cbfee96461f10d
parent1a3fc2c402810bf336882e695abd1678dbc8d279
xen: allocate page for shared info page from low memory

In a HVM guest the kernel allocates the page for mapping the shared
info structure via extend_brk() today. This will lead to a drop of
performance as the underlying EPT entry will have to be split up into
4kB entries as the single shared info page is located in hypervisor
memory.

The issue has been detected by using the libmicro munmap test:
unmapping 8kB of memory was faster by nearly a factor of two when no
pv interfaces were active in the HVM guest.

So instead of taking a page from memory which might be mapped via
large EPT entries use a page which is already mapped via a 4kB EPT
entry: we can take a page from the first 1MB of memory as the video
memory at 640kB disallows using larger EPT entries.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
arch/x86/xen/enlighten_hvm.c
arch/x86/xen/enlighten_pv.c