netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Li,Rongqing" <lirongqing@baidu.com>
To: "saeedm@nvidia.com" <saeedm@nvidia.com>,
	"leon@kernel.org" <leon@kernel.org>,
	"tariqt@nvidia.com" <tariqt@nvidia.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>
Subject: 答复: [PATCH][net-next] net/mlx5: Pick the first matched node of priv.free_list in alloc_4k
Date: Fri, 13 Dec 2024 04:43:45 +0000	[thread overview]
Message-ID: <e2a50fa8fd79488cb047018713e14731@baidu.com> (raw)
In-Reply-To: <20240823061648.17862-1-lirongqing@baidu.com>


> 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)
> --


ping

> 2.9.4


  reply	other threads:[~2024-12-13  5:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2024-12-13  7:26 ` Zhu Yanjun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e2a50fa8fd79488cb047018713e14731@baidu.com \
    --to=lirongqing@baidu.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=saeedm@nvidia.com \
    --cc=tariqt@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).