[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-ia64-devel] [PATCH] pal_halt_light emulate for domU TAKE3
On Mon, Aug 21, 2006 at 08:38:33PM +0900, Atsushi SAKAI wrote:
> 2)The VIRQ_ITC cycle is destroyed
> in case vcpu migration occurred when vcpu_pend_timer runs (called by
> The VIRQ_ITC cycle is (simple writing)
> ia64_get_itc reaches domain_itm at Xen.
> send VIRQ_ITC to GuestOS
> GuestOS handles and set next itm by hypercall to Xen
> Currently, the function order in vcpu_pend_timer is
> a)send VIRQ_ITC(vcpu_pend_timer)
> b)then stamp the signal send information.(update domain_itm_last)
> In this configuration,
> domain_itm_last update time and hypercall set itm(which comes from VIRQ_ITC)
> is important.
> This order is problematic in case vcpu_migration occurred as follows
> (following event occures nearly 1-2 hour running
> by 2xDomU 3vcpu(total 6vcpu for domU) in 4pcpu Linux Kernel Compile test)
> vcpu_pend_timer@A is started.(GuestOS is not running at this moment)
> vcpu_pend_timer@A is paused
> Credit Scheduler steal vcpu from A to B
> vcpu_pend_timer@B is started and ended
> ******The following process should be after vcpu_pend_timer*****
> domain_itm is set by GuestOS hypercall. and domain_itm updated.
> vcpu_pend_timer@A is resumed. but domain_itm is already updated.
> To avoid this, order should be exchanged b) a)
> After this fixation, we are free from timing consideration of
> VIRQ_ITC cycle and domain_itm_last update time.
> (domain_itm_last update should be before the hypercall set itm)
Could you elaborate more? I don't understand.
What phenomenan did you observed?
vcpu_pend_timer() is called with its parameter as current.
It means that test_bit(_VCPUF_running, vcpu->vcpu_flags) is
always true becuase vcpu == current.
On the other hand, scheduler mustn't steal vcpu with _VCPUF_running set.
The vcpu stealing doesn't occur so that the above sequence
doesn't make sense (to me at least.)
Xen-ia64-devel mailing list