]> git.baikalelectronics.ru Git - kernel.git/commit
xen: Speed up set_phys_to_machine() by using read-only mappings
authorJuergen Gross <jgross@suse.com>
Fri, 28 Nov 2014 10:53:59 +0000 (11:53 +0100)
committerDavid Vrabel <david.vrabel@citrix.com>
Thu, 4 Dec 2014 14:09:20 +0000 (14:09 +0000)
commit429c8ebd198af81749e298525ef983151764b2af
tree0e2d5e5f1cdd88bc459e284eb9dc88c1c1b6e7bc
parent91a7c1d41d50e5f56ee35b53a3d1f99798b380d9
xen: Speed up set_phys_to_machine() by using read-only mappings

Instead of checking at each call of set_phys_to_machine() whether a
new p2m page has to be allocated due to writing an entry in a large
invalid or identity area, just map those areas read only and react
to a page fault on write by allocating the new page.

This change will make the common path with no allocation much
faster as it only requires a single write of the new mfn instead
of walking the address translation tables and checking for the
special cases.

Suggested-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: David Vrabel <david.vrabel@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
arch/x86/xen/p2m.c