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

Re: [Xen-devel] [PATCH] xen: credit1: fix tickling when it happens from a remote pCPU



>>> On 24.09.15 at 06:31, <dario.faggioli@xxxxxxxxxx> wrote:
> --- a/xen/common/sched_credit.c
> +++ b/xen/common/sched_credit.c
> @@ -168,14 +168,16 @@ struct csched_pcpu {
>  };
>  
>  /*
> - * Convenience macro for accessing the per-PCPU cpumask we need for
> + * Convenience macros for accessing the per-PCPU cpumask we need for
>   * implementing the two steps (soft and hard affinity) balancing logic.
>   * It is stored in csched_pcpu so that serialization is not an issue,
> - * as there is a csched_pcpu for each PCPU and we always hold the
> - * runqueue spin-lock when using this.
> + * as there is a csched_pcpu for each PCPU, and we always hold the
> + * runqueue lock for the proper PCPU when using these.
>   */
>  #define csched_balance_mask (CSCHED_PCPU(smp_processor_id())->balance_mask)
>  
> +#define csched_balance_mask_cpu(c) (CSCHED_PCPU(c)->balance_mask)

csched_runq_steal() gets called with peer_cpu's runqueue lock held
afaics, but uses smp_processor_id()'s balance_mask. I.e. it looks to
me that what JÃrgen suggested as an option is actually a requirement.

Jan

_______________________________________________
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®.