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

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

 



On 01/29/2012 03:22 PM, Takuya Yoshikawa wrote:
> 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.

Yes.  This automatically includes the intersection calculation, since
you have to do it for the 'for each page in slot' loop.

-- 
error compiling committee.c: too many arguments to function

--
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