[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2] xen: credit2: avoid using cpumask_weight() in hot-paths
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 need for cpumask_weight(). While there, remove as much other uses of it as we can, even if not in hot-paths. Signed-off-by: Dario Faggioli <dfaggioli@xxxxxxxx> --- Cc: George Dunlap <george.dunlap@xxxxxxxxxxxxx> Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Cc: Andrii Anisov <andrii.anisov@xxxxxxxxx> --- I just realized this patch fell through the cracks! :-O I sent it quite a while ago, I got some comments from Andrew and Andrii, but then never really followed up. So here we hare! Changes from v1: * nr_cpus is now unsigned * coding style (no hard tabs) * killed a couple of redundant ASSERT()s --- Reviewed-by: Andrii Anisov <andrii_anisov@xxxxxxxx> -- Sincerely, Andrii Anisov. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |