]> git.baikalelectronics.ru Git - kernel.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)
commitcfd8a2e1aaae772531e58341fc334a1556348a3f
tree7a56d9ab6a01a47a8b758f90b5cbfee96461f10d
parent55b6b3efedc1f296a3fff8300ada232d8a419a7a
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