lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e2a50fa8fd79488cb047018713e14731@baidu.com>
Date: Fri, 13 Dec 2024 04:43:45 +0000
From: "Li,Rongqing" <lirongqing@...du.com>
To: "saeedm@...dia.com" <saeedm@...dia.com>, "leon@...nel.org"
	<leon@...nel.org>, "tariqt@...dia.com" <tariqt@...dia.com>,
	"davem@...emloft.net" <davem@...emloft.net>, "edumazet@...gle.com"
	<edumazet@...gle.com>, "kuba@...nel.org" <kuba@...nel.org>,
	"pabeni@...hat.com" <pabeni@...hat.com>, "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>, "linux-rdma@...r.kernel.org"
	<linux-rdma@...r.kernel.org>
Subject: 答复: [PATCH][net-next] net/mlx5: Pick the first matched node of priv.free_list in alloc_4k


> Pick the first node instead of last, to avoid unnecessary iterating over whole
> free list
> 
> Signed-off-by: Li RongQing <lirongqing@...du.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ