Re: [Xen-devel] [PATCH v2] xen: credit2: avoid using cpumask_weight() in hot-paths

2019-07-30 Thread George Dunlap
On 7/29/19 11:49 AM, Dario Faggioli wrote: > cpumask_weight() is known to be expensive. In Credit2, we use it in > load-balancing, but only for knowing how many CPUs are active in a > runqueue. > > Keeping such count in an integer field of the per-runqueue data > structure we have, completely avoi

Re: [Xen-devel] [PATCH v2] xen: credit2: avoid using cpumask_weight() in hot-paths

2019-07-29 Thread Andrii Anisov
On 29.07.19 13:49, Dario Faggioli wrote: cpumask_weight() is known to be expensive. In Credit2, we use it in load-balancing, but only for knowing how many CPUs are active in a runqueue. Keeping such count in an integer field of the per-runqueue data structure we have, completely avoids the nee

[Xen-devel] [PATCH v2] xen: credit2: avoid using cpumask_weight() in hot-paths

2019-07-29 Thread Dario Faggioli
cpumask_weight() is known to be expensive. In Credit2, we use it in load-balancing, but only for knowing how many CPUs are active in a runqueue. Keeping such count in an integer field of the per-runqueue data structure we have, completely avoids the need for cpumask_weight(). While there, remove