Re: [PATCH 41/49] RDMA/hfi1: replace cpumask_weight with cpumask_weight_{eq, ...} where appropriate
From: Jason Gunthorpe
Date: Fri Feb 11 2022 - 14:11:21 EST
On Thu, Feb 10, 2022 at 02:49:25PM -0800, Yury Norov wrote:
> Infiniband code uses cpumask_weight() to compare the weight of cpumask
> with a given number. We can do it more efficiently with
> cpumask_weight_{eq, ...} because conditional cpumask_weight may stop
> traversing the cpumask earlier, as soon as condition is (or can't be) met.
>
> Signed-off-by: Yury Norov <yury.norov@xxxxxxxxx>
> ---
> drivers/infiniband/hw/hfi1/affinity.c | 9 ++++-----
> drivers/infiniband/hw/qib/qib_file_ops.c | 2 +-
> drivers/infiniband/hw/qib/qib_iba7322.c | 2 +-
> 3 files changed, 6 insertions(+), 7 deletions(-)
I suppose you'll send this with the prior patch adding the functions
in which case
Acked-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
Jason