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

Re: [Xen-devel] PML (Page Modification Logging) design for Xen




On 02/12/2015 03:09 PM, Tian, Kevin wrote:
From: Kai Huang [mailto:kai.huang@xxxxxxxxxxxxxxx]
Sent: Thursday, February 12, 2015 2:57 PM

On 02/12/2015 02:54 PM, Tian, Kevin wrote:
From: Kai Huang [mailto:kai.huang@xxxxxxxxxxxxxxx]
Sent: Thursday, February 12, 2015 10:39 AM
PML needs to be enabled (allocate PML buffer, initialize PML index,
PML base address, turn PML on VMCS, etc) for all vcpus of the domain,
as PML buffer and PML index are per-vcpu, but EPT table may be shared
by vcpus. Enabling PML on partial vcpus of the domain won't work. Also
PML will only be enabled for the domain when it is switched to dirty
logging mode, and it will be disabled when domain is switched back to
normal mode. As looks vcpu number won't be changed dynamically
during
guest is running (correct me if I am wrong here), so we don't have to
consider enabling PML for new created vcpu when guest is in dirty
logging mode.
There are exactly d->max_vcpus worth of struct vcpus (and therefore
VMCSes) for a domain after creation, and will exist for the lifetime of
the domain.  There is no dynamic adjustment of numbers of vcpus during
runtime.
Good to know.
could we at least detect and warn vcpu changes when PML is enabled?
dirty logging happens out of guest's knowledge and there could be the
case where user right online/offline a vcpu within that window.
Why is the warning necessary? There's no harm leaving PML enabled when
vcpu becomes offline.
what about online? you need enable PML for newly-online vcpu since
meaningful work may be scheduled to it within logdirty window.
Do you mean vcpu number (those offline + those online) can be changed during guest's runtime, ex, a new vcpu is created and becomes online after PML is enabled for the domain? Otherwise, I don't see a problem.

As long as the total number of vcpus remains constant, it's not a problem, as we only enable PML after all vcpus are created (and it remains constant), and the vcpu status is irrelevant.

Thanks,
-Kai

Also we will not disable PML for that vcpu when it becomes offline, in
which case we don't need to re-enable PML, which can fail, when vcpu
becomes online again. It simplifies the logic.
offline is not a problem

Thanks
Kevin



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.