[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220510154750.212913-16-yury.norov@gmail.com>
Date: Tue, 10 May 2022 08:47:43 -0700
From: Yury Norov <yury.norov@...il.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
David Laight <David.Laight@...LAB.COM>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Joe Perches <joe@...ches.com>,
Julia Lawall <Julia.Lawall@...ia.fr>,
Michał Mirosław <mirq-linux@...e.qmqm.pl>,
Nicholas Piggin <npiggin@...il.com>,
Nicolas Palix <nicolas.palix@...g.fr>,
Peter Zijlstra <peterz@...radead.org>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Matti Vaittinen <Matti.Vaittinen@...rohmeurope.com>,
linux-kernel@...r.kernel.org
Cc: Yury Norov <yury.norov@...il.com>,
"David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Leon Romanovsky <leon@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Saeed Mahameed <saeedm@...dia.com>, netdev@...r.kernel.org,
linux-rdma@...r.kernel.org
Subject: [PATCH 15/22] net/mlx5: use cpumask_weight_gt() in irq_pool_request_irq()
cpumask_weight_gt() is more efficient because it may stop traversing
cpumask depending on condition.
CC: David S. Miller <davem@...emloft.net>
CC: Eric Dumazet <edumazet@...gle.com>
CC: Jakub Kicinski <kuba@...nel.org>
CC: Leon Romanovsky <leon@...nel.org>
CC: Paolo Abeni <pabeni@...hat.com>
CC: Saeed Mahameed <saeedm@...dia.com>
CC: netdev@...r.kernel.org
CC: linux-rdma@...r.kernel.org
CC: linux-kernel@...r.kernel.org
Signed-off-by: Yury Norov <yury.norov@...il.com>
---
drivers/net/ethernet/mellanox/mlx5/core/irq_affinity.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/irq_affinity.c b/drivers/net/ethernet/mellanox/mlx5/core/irq_affinity.c
index 380a208ab137..d57f804ee934 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/irq_affinity.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/irq_affinity.c
@@ -58,7 +58,7 @@ irq_pool_request_irq(struct mlx5_irq_pool *pool, const struct cpumask *req_mask)
if (err)
return ERR_PTR(err);
if (pool->irqs_per_cpu) {
- if (cpumask_weight(req_mask) > 1)
+ if (cpumask_weight_gt(req_mask, 1))
/* if req_mask contain more then one CPU, set the least loadad CPU
* of req_mask
*/
--
2.32.0
Powered by blists - more mailing lists