[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210930171052.30660edb@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Thu, 30 Sep 2021 17:10:52 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: "David S . Miller" <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
Eric Dumazet <edumazet@...gle.com>,
Tariq Toukan <tariqt@...dia.com>
Subject: Re: [PATCH net-next] net/mlx4_en: avoid one cache line miss to ring
doorbell
On Thu, 30 Sep 2021 12:40:31 -0700 Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@...gle.com>
>
> This patch caches doorbell address directly in struct mlx4_en_tx_ring.
>
> This removes the need to bring in cpu caches whole struct mlx4_uar
> in fast path.
>
> Note that mlx4_uar is not guaranteed to be on a local node,
> because mlx4_bf_alloc() uses a single free list (priv->bf_list)
> regardless of its node parameter.
>
> This kind of change does matter in presence of light/moderate traffic.
> In high stress, this read-only line would be kept hot in caches.
>
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Cc: Tariq Toukan <tariqt@...dia.com>
> /* Following part should be mostly read */
> + void *doorbell_address;
We'll need to make sparse happy before applying:
drivers/net/ethernet/mellanox/mlx4/en_tx.c:133:32: warning: incorrect type in assignment (different address spaces)
drivers/net/ethernet/mellanox/mlx4/en_tx.c:133:32: expected void *doorbell_address
drivers/net/ethernet/mellanox/mlx4/en_tx.c:133:32: got void [noderef] __iomem *
drivers/net/ethernet/mellanox/mlx4/en_tx.c:757:56: warning: incorrect type in argument 2 (different address spaces)
drivers/net/ethernet/mellanox/mlx4/en_tx.c:757:56: expected void [noderef] __iomem *
drivers/net/ethernet/mellanox/mlx4/en_tx.c:757:56: got void *doorbell_address
Powered by blists - more mailing lists