From: Zhu Yanjun <yanjun.zhu@linux.dev>
To: Li RongQing <lirongqing@baidu.com>,
saeedm@nvidia.com, leon@kernel.org, tariqt@nvidia.com,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, netdev@vger.kernel.org,
linux-rdma@vger.kernel.org
Subject: Re: [PATCH][net-next] net/mlx5: Pick the first matched node of priv.free_list in alloc_4k
Date: Fri, 13 Dec 2024 08:26:58 +0100 [thread overview]
Message-ID: <b82f5caf-09d7-49be-aa4a-8a402d6b89a2@linux.dev> (raw)
In-Reply-To: <20240823061648.17862-1-lirongqing@baidu.com>
在 2024/8/23 8:16, 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>
Your commit is to fix the problem from the following commit?
So the following should be needed.
Fixes: 2726cd4a2928 ("net/mlx5: Dedicate fw page to the requesting function"
commit 2726cd4a29280c20ea983be285a6aefe75b205a4
Author: Eran Ben Elisha <eranbe@mellanox.com>
Date: Sun May 3 10:15:58 2020 +0300
net/mlx5: Dedicate fw page to the requesting function
The cited patch assumes that all chuncks in a fw page belong to the
same
function, thus the driver must dedicate fw page to the requesting
function, which is actually what was intedned in the original fw pages
allocator design, hence the fwp->func_id !
Up until the cited patch everything worked ok, but now "relase all
pages"
is broken on systems with page_size > 4k.
Fix this by dedicating fw page to the requesting function id via
adding a
func_id parameter to alloc_4k() function.
Fixes: c6168161f693 ("net/mlx5: Add support for release all pages
event")
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Zhu Yanjun
> ---
> 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)
prev parent reply other threads:[~2024-12-13 7:27 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
2024-12-13 7:26 ` Zhu Yanjun [this message]
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=b82f5caf-09d7-49be-aa4a-8a402d6b89a2@linux.dev \
--to=yanjun.zhu@linux.dev \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=lirongqing@baidu.com \
--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).