|
[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
>>> 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?
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |