Re: [RFC] KVM MMU: improve large munmap efficiency

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

 



On Sun, 29 Jan 2012 13:01:18 +0200
Avi Kivity <avi@xxxxxxxxxx> wrote:

> > Tested by attaching a debugger to a running qemu w/kvm and running
> > "call munmap(0, 1UL << 46)".
> >
> 
> How about computing the intersection of (start, end) with the hva ranges
> in kvm->memslots?
> 
> If there is no intersection, you exit immediately.

I think introducing kvm_handle_hva_range() is the right thing if we really
care about unmapping large area at once.

Current iteration:
for each page
	for each slot
		for each level

My suggestion:
for each slot
	for each level
		for each page

This way compiler can optimize the task to be a simple iteration over the
rmap array.

But I could not imagine why unmapping 128GB is needed.
mmu_notifier will not do such crazy thing.

	Takuya

> 
> It's still possible for the work to drop the intersection to be larger
> than dropping the entire shadow, but it's unlikely.
--
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