| Date | Fri, 11 Feb 2022 15:11:12 -0400 | From | Jason Gunthorpe <> | Subject | Re: [PATCH 41/49] RDMA/hfi1: replace cpumask_weight with cpumask_weight_{eq, ...} where appropriate |
| |
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@gmail.com> > --- > 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@nvidia.com>
Jason
|