[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 3/3] VMX: Remove the vcpu from the per-cpu blocking list after domain termination
> -----Original Message----- > From: Jan Beulich [mailto:JBeulich@xxxxxxxx] > Sent: Monday, May 23, 2016 8:36 PM > To: Wu, Feng <feng.wu@xxxxxxxxx> > Cc: andrew.cooper3@xxxxxxxxxx; dario.faggioli@xxxxxxxxxx; > george.dunlap@xxxxxxxxxxxxx; Tian, Kevin <kevin.tian@xxxxxxxxx>; xen- > devel@xxxxxxxxxxxxx; konrad.wilk@xxxxxxxxxx; keir@xxxxxxx > Subject: Re: [PATCH 3/3] VMX: Remove the vcpu from the per-cpu blocking list > after domain termination > > >>> On 20.05.16 at 10:53, <feng.wu@xxxxxxxxx> wrote: > > --- a/xen/arch/x86/hvm/vmx/vmx.c > > +++ b/xen/arch/x86/hvm/vmx/vmx.c > > @@ -248,6 +248,36 @@ void vmx_pi_hooks_deassign(struct domain *d) > > d->arch.hvm_domain.vmx.pi_switch_to = NULL; > > } > > > > +static void vmx_pi_blocking_list_cleanup(struct domain *d) > > +{ > > + unsigned int cpu; > > + > > + for_each_online_cpu ( cpu ) > > + { > > + struct vcpu *v; > > + unsigned long flags; > > + struct arch_vmx_struct *vmx, *tmp; > > + spinlock_t *lock = &per_cpu(vmx_pi_blocking, cpu).lock; > > + struct list_head *blocked_vcpus = &per_cpu(vmx_pi_blocking, > > cpu).list; > > + > > + spin_lock_irqsave(lock, flags); > > + > > + list_for_each_entry_safe(vmx, tmp, blocked_vcpus, pi_blocking.list) > > + { > > Did you consider how long these two nested loops may take on a > large system? > As Dario just mentioned, we may not need this loop at all. Thanks, Feng > Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |