Re: Single memory slot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 15, 2009 at 04:33:11PM +0900, Avi Kivity wrote:
> One way to improve the gfn_to_pfn() memslot search is to register just  
> one slot.  This can only work on 64-bit, since even the smallest guests  
> need 4GB of physical address space.  Apart from speeding up  
> gfn_to_page(), it would also speed up mmio which must iterate over all  
> slots, so a lookup cache cannot help.
>
> This would require quite a bunch of changes:
> - modify gfn_to_pfn() to fail gracefully if the page is in the slot but  
> unmapped (hole handling)
> - modify qemu to reserve the guest physical address space
> - modify qemu memory allocation to use MAP_FIXED to allocate memory
> - some hack for the vga aliases (mmap an fd multiple times?)
> - some hack for the vmx-specific pages (e.g. APIC-access page)
>
> Not sure it's worthwhile, but something to keep in mind if a simple  
> cache or sort by size is insufficient due to mmio.

Downside is you lose the ability to write protect a small slot only 
(could mprotect(MAP_READ) the desired area but get_log+write_protect 
must be atomic).

Also if you enable dirty log for the large slot largepages are disabled.


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux