* [PATCH][net-next] i40e: prefetch struct page of rx buffer conditionally
@ 2020-07-02 6:38 Li RongQing
2020-07-08 20:46 ` [Intel-wired-lan] " Bowers, AndrewX
0 siblings, 1 reply; 2+ messages in thread
From: Li RongQing @ 2020-07-02 6:38 UTC (permalink / raw)
To: intel-wired-lan, netdev
page_address() accesses struct page only when WANT_PAGE_VIRTUAL
or HASHED_PAGE_VIRTUAL is defined, otherwise it returns address
based on offset, so we prefetch it conditionally
Signed-off-by: Li RongQing <lirongqing@baidu.com>
---
drivers/net/ethernet/intel/i40e/i40e_txrx.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index f9555c847f73..b3836092c327 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -1953,7 +1953,9 @@ static struct i40e_rx_buffer *i40e_get_rx_buffer(struct i40e_ring *rx_ring,
struct i40e_rx_buffer *rx_buffer;
rx_buffer = i40e_rx_bi(rx_ring, rx_ring->next_to_clean);
+#if defined(WANT_PAGE_VIRTUAL) || defined(HASHED_PAGE_VIRTUAL)
prefetchw(rx_buffer->page);
+#endif
/* we are reusing so sync this buffer for CPU use */
dma_sync_single_range_for_cpu(rx_ring->dev,
--
2.16.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [Intel-wired-lan] [PATCH][net-next] i40e: prefetch struct page of rx buffer conditionally
2020-07-02 6:38 [PATCH][net-next] i40e: prefetch struct page of rx buffer conditionally Li RongQing
@ 2020-07-08 20:46 ` Bowers, AndrewX
0 siblings, 0 replies; 2+ messages in thread
From: Bowers, AndrewX @ 2020-07-08 20:46 UTC (permalink / raw)
To: intel-wired-lan, netdev
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Li
> RongQing
> Sent: Wednesday, July 1, 2020 11:38 PM
> To: intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org
> Subject: [Intel-wired-lan] [PATCH][net-next] i40e: prefetch struct page of rx
> buffer conditionally
>
> page_address() accesses struct page only when WANT_PAGE_VIRTUAL or
> HASHED_PAGE_VIRTUAL is defined, otherwise it returns address based on
> offset, so we prefetch it conditionally
>
> Signed-off-by: Li RongQing <lirongqing@baidu.com>
> ---
> drivers/net/ethernet/intel/i40e/i40e_txrx.c | 2 ++
> 1 file changed, 2 insertions(+)
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-08 20:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-02 6:38 [PATCH][net-next] i40e: prefetch struct page of rx buffer conditionally Li RongQing
2020-07-08 20:46 ` [Intel-wired-lan] " Bowers, AndrewX
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).