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

Re: [Xen-devel] [PATCH] credit: generalize __vcpu_has_soft_affinity()



>>> On 04.03.15 at 13:08, <dario.faggioli@xxxxxxxxxx> wrote:
> On Wed, 2015-03-04 at 09:16 +0000, Jan Beulich wrote:
>> --- a/xen/common/sched_credit.c
>> +++ b/xen/common/sched_credit.c
>> @@ -292,11 +292,9 @@ __runq_remove(struct csched_vcpu *svc)
>>  static inline int __vcpu_has_soft_affinity(const struct vcpu *vc,
>>                                             const cpumask_t *mask)
>>  {
>> -    if ( cpumask_full(vc->cpu_soft_affinity)
>> -         || !cpumask_intersects(vc->cpu_soft_affinity, mask) )
>> -        return 0;
>> -
>> -    return 1;
>> +    return !cpumask_subset(&cpu_online_map, vc->cpu_soft_affinity) &&
>>
> This can use VCPU2ONLINE(vc). Or do you think the impact of one more if
> (the ?: in cpupool_online_cpumask) would be too much?

No, I think that would be fine. I simply wasn't aware of the construct.
v2 soon to come.

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