Re: [RFC PATCH 2/2] KVM: selective write protection using dirty bitmap

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

 



(2010/11/18 22:06), Avi Kivity wrote:
On 11/18/2010 07:15 AM, Takuya Yoshikawa wrote:


We can also use this to selectively write protect pages to reduce unwanted page
faults in the future.


Looks like a good approach. Any measurements?


OK, I'll do some tests to select a right approach.

Personally, and some as a job if possible, I'm planning various things.


a) Frame buffer: small bitmap size (my hobby now)

   Performance:
     Both function level and guest side measurements is necessary. *1
     For interactivity, qemu side intelligence may be needed.
     Note: qemu side dirty bitmap optimization by Kemari team is pending now.

   Correctness:
     I doubt qemu side but I'm not good at device level VGA details yet, sorry.

   *1) I once tried to update dirty bitmap without srcu sync by using
       atomic_clear_mask() word by word. This seemed to be working and
       get_dirty_log() was not bad. But when I tested x11perf inside the guest,
       the numbers were worse than the original implementation (LOCK_PREFIX
       might do bad things to the cache and srcu reader side suffered, I guess).

       Good SRCU!


b) Live-migration: large bitmap size (my target is ~4GB RAM now)

   Performance:
     Scalability is important in both RAM size and number of dirty pages point
     of view. We need to achieve this goal without sacrificing the low workload
     case.

   Correctness:
     I'm trying to make live-migration fail in the condition of without mst's fix
     by multi threaded high work load. SMP is necessary.



+
+ if (!(gfn_offset || (gfn % huge)))
+ break;

Why?

I preserved these lines from Lai's original.
>> http://www.spinics.net/lists/kvm/msg35871.html

But OK, I found some duplication probably. I'll fix.



wrt. O(1) write protection: hard to tell if the two methods can coexist. For direct mapped shadow pages (i.e. ep/npt) I think we can use the mask to speed up clearing of an individual sp's sptes.


OK, I'll test both with and without NPT.
The result may lead us to the right direction.



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