Skip to contentSkip to conversation

bnx2x: Prefetch the page containing the BD descriptor

PATCH In review Eilon Greenstein 1 participant 1 message Aug 12, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 15/36 bnx2x: Prefetch the page containing the BD descriptor

---
 drivers/net/bnx2x_main.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
drivers/net/bnx2x_main.c +7 -0
index e6fde5e..594168a 100644
@@ -1497,6 +1497,13 @@ static int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget)
 		bd_prod = RX_BD(bd_prod);
 		bd_cons = RX_BD(bd_cons);
 
+		/* Prefetch the page containing the BD descriptor
+		   at producer's index. It will be needed when new skb is
+		   allocated */
+		prefetch((void *)(PAGE_ALIGN((unsigned long)
+					     (&fp->rx_desc_ring[bd_prod])) -
+				  PAGE_SIZE + 1));
+
 		cqe = &fp->rx_comp_ring[comp_ring_cons];
 		cqe_fp_flags = cqe->fast_path_cqe.type_error_flags;
 
Signature · 1 line
1.5.4.3