All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][net-next] net/mlx5: Pick the first matched node of priv.free_list in alloc_4k
@ 2024-08-23  6:16 Li RongQing
  2024-12-13  4:43 ` 答复: " Li,Rongqing
  2024-12-13  7:26 ` Zhu Yanjun
  0 siblings, 2 replies; 3+ messages in thread
From: Li RongQing @ 2024-08-23  6:16 UTC (permalink / raw)
  To: saeedm, leon, tariqt, davem, edumazet, kuba, pabeni, netdev,
	linux-rdma
  Cc: Li RongQing

Pick the first node instead of last, to avoid unnecessary iterating
over whole free list

Signed-off-by: Li RongQing <lirongqing@baidu.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c b/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c
index 972e8e9..cd20f11 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c
@@ -228,6 +228,7 @@ static int alloc_4k(struct mlx5_core_dev *dev, u64 *addr, u32 function)
 		if (iter->function != function)
 			continue;
 		fp = iter;
+		break;
 	}
 
 	if (list_empty(&dev->priv.free_list) || !fp)
-- 
2.9.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-12-13  7:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-23  6:16 [PATCH][net-next] net/mlx5: Pick the first matched node of priv.free_list in alloc_4k Li RongQing
2024-12-13  4:43 ` 答复: " Li,Rongqing
2024-12-13  7:26 ` Zhu Yanjun

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.