[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250113203710.000033dc@gmail.com>
Date: Mon, 13 Jan 2025 20:37:10 +0800
From: Furong Xu <0x1207@...il.com>
To: Alexander Lobakin <aleksander.lobakin@...el.com>
Cc: <netdev@...r.kernel.org>, <linux-stm32@...md-mailman.stormreply.com>,
<linux-arm-kernel@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski
<kuba@...nel.org>, "Paolo Abeni" <pabeni@...hat.com>, Maxime Coquelin
<mcoquelin.stm32@...il.com>, <xfr@...look.com>
Subject: Re: [PATCH net-next v1 3/3] net: stmmac: Optimize cache prefetch in
RX path
On Mon, 13 Jan 2025 13:10:46 +0100, Alexander Lobakin <aleksander.lobakin@...el.com> wrote:
> > @@ -5596,6 +5593,7 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
> > } else if (buf1_len) {
> > dma_sync_single_for_cpu(priv->device, buf->addr,
> > buf1_len, dma_dir);
> > + prefetch(page_address(buf->page) + buf->page_offset);
> > skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
> > buf->page, buf->page_offset, buf1_len,
> > priv->dma_conf.dma_buf_sz);
>
> Are you sure you need to prefetch frags as well? I'd say this is a waste
> of cycles, as the kernel core stack barely looks at payload...
> Probably prefetching only header buffers would be enough.
>
Yes, do not prefetch for frags is more reasonable.
Thanks!
pw-bot: changes-requested
Powered by blists - more mailing lists