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

Re: [Xen-devel] [PATCH] xen/sched: fix onlining cpu with core scheduling active



On 03.03.2020 13:27, Juergen Gross wrote:
> --- a/xen/common/sched/cpupool.c
> +++ b/xen/common/sched/cpupool.c
> @@ -616,7 +616,8 @@ static int cpupool_cpu_add(unsigned int cpu)
>      get_sched_res(cpu)->cpupool = NULL;
>  
>      cpus = sched_get_opt_cpumask(cpupool0->gran, cpu);
> -    if ( cpumask_subset(cpus, &cpupool_free_cpus) )
> +    if ( cpumask_subset(cpus, &cpupool_free_cpus) &&
> +         cpumask_weight(cpus) >= cpupool_get_granularity(cpupool0) )

Why >= , not == ? And is the other part of the condition needed?
Isn't this rather a condition that could be ASSERT()ed, as CPUs
shouldn't move out of the "free" set before reaching the
granularity?

Jan

>          ret = cpupool_assign_cpu_locked(cpupool0, cpu);
>  
>      rcu_read_unlock(&sched_res_rculock);
> 


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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