[PATCH net-next-2.6] bnx2x: Remove two prefetch()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Eric Dumazet
Date: Tuesday, April 27, 2010 - 3:18 pm

Le mardi 27 avril 2010 à 15:08 -0700, David Miller a écrit :

Thanks David, I was about to resubmit the cumulative patch ;)

On my 'old' dev machine (two quad core), RPS is able to get a 300%
increase on udpsink test on 20 flows.

I yet have to make routing/firewalling tests as well.

I also noticed bnx2x driver has some strange prefetch() calls.

[PATCH net-next-2.6] bnx2x: Remove two prefetch()

1) Even on 64bit arches, sizeof(struct sk_buff) < 256
2) No need to prefetch same pointer twice.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Eilon Greenstein <eilong@broadcom.com>
---

diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index 613f727..f706ed1 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -1617,7 +1617,6 @@ static int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget)
 			rx_buf = &fp->rx_buf_ring[bd_cons];
 			skb = rx_buf->skb;
 			prefetch(skb);
-			prefetch((u8 *)skb + 256);
 			len = le16_to_cpu(cqe->fast_path_cqe.pkt_len);
 			pad = cqe->fast_path_cqe.placement_offset;
 
@@ -1668,7 +1667,6 @@ static int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget)
 					dma_unmap_addr(rx_buf, mapping),
 						   pad + RX_COPY_THRESH,
 						   DMA_FROM_DEVICE);
-			prefetch(skb);
 			prefetch(((char *)(skb)) + 128);
 
 			/* is this an error packet? */



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH net-next-2.6] bnx2x: Remove two prefetch(), Eric Dumazet, (Tue Apr 27, 3:18 pm)
Re: [PATCH net-next-2.6] bnx2x: Remove two prefetch(), David Miller, (Tue Apr 27, 3:19 pm)
Re: [PATCH net-next-2.6] bnx2x: Remove two prefetch(), Eric Dumazet, (Wed Apr 28, 5:33 am)
Re: [PATCH net-next-2.6] bnx2x: Remove two prefetch(), Eilon Greenstein, (Wed Apr 28, 6:14 am)
[PATCH net-next-2.6] net: speedup udp receive path, Eric Dumazet, (Wed Apr 28, 7:06 am)
Re: [PATCH net-next-2.6] net: speedup udp receive path, Eric Dumazet, (Wed Apr 28, 7:19 am)
Re: [PATCH net-next-2.6] net: speedup udp receive path, Eric Dumazet, (Wed Apr 28, 7:34 am)
Re: [PATCH net-next-2.6] bnx2x: Remove two prefetch(), Eliezer Tamir, (Wed Apr 28, 8:44 am)
Re: [PATCH net-next-2.6] bnx2x: Remove two prefetch(), David Miller, (Wed Apr 28, 9:53 am)
Re: [PATCH net-next-2.6] bnx2x: Remove two prefetch(), David Miller, (Wed Apr 28, 9:55 am)
Re: [PATCH net-next-2.6] net: speedup udp receive path, David Miller, (Wed Apr 28, 2:36 pm)
[PATCH net-next-2.6] net: ip_queue_rcv_skb() helper, Eric Dumazet, (Wed Apr 28, 3:22 pm)
Re: [PATCH net-next-2.6] net: ip_queue_rcv_skb() helper, David Miller, (Wed Apr 28, 3:39 pm)
Re: [PATCH net-next-2.6] net: speedup udp receive path, Eric Dumazet, (Wed Apr 28, 9:09 pm)
Re: [PATCH net-next-2.6] net: speedup udp receive path, Changli Gao, (Thu Apr 29, 5:12 am)
Re: [PATCH net-next-2.6] net: speedup udp receive path, Eric Dumazet, (Thu Apr 29, 5:45 am)
Re: [PATCH net-next-2.6] net: speedup udp receive path, Eric Dumazet, (Thu Apr 29, 6:21 am)
Re: [PATCH net-next-2.6] net: speedup udp receive path, Eric Dumazet, (Thu Apr 29, 6:49 am)
OFT - reserving CPU's for networking, Stephen Hemminger, (Thu Apr 29, 11:10 am)
Re: OFT - reserving CPU's for networking, Thomas Gleixner, (Thu Apr 29, 12:19 pm)
Re: OFT - reserving CPU's for networking, Eric Dumazet, (Thu Apr 29, 1:02 pm)
Re: [PATCH net-next-2.6] net: speedup udp receive path, Changli Gao, (Thu Apr 29, 4:07 pm)
Re: OFT - reserving CPU's for networking, Brian Bloniarz, (Fri Apr 30, 11:15 am)
Re: OFT - reserving CPU's for networking, David Miller, (Fri Apr 30, 11:57 am)
Re: OFT - reserving CPU's for networking, Thomas Gleixner, (Fri Apr 30, 12:58 pm)
Re: [PATCH net-next-2.6] net: speedup udp receive path, Eric Dumazet, (Fri Apr 30, 1:40 pm)
Re: OFT - reserving CPU's for networking, Andi Kleen, (Fri Apr 30, 2:01 pm)
Re: OFT - reserving CPU's for networking, David Miller, (Fri Apr 30, 3:30 pm)
Re: [PATCH net-next-2.6] net: speedup udp receive path, Eric Dumazet, (Fri Apr 30, 10:57 pm)
Re: [PATCH net-next-2.6] net: speedup udp receive path, Eric Dumazet, (Fri Apr 30, 11:14 pm)
Re: [PATCH net-next-2.6] net: speedup udp receive path, Eric Dumazet, (Sat May 1, 3:47 am)
Re: OFT - reserving CPU's for networking, Andi Kleen, (Sat May 1, 3:53 am)
Re: [PATCH net-next-2.6] net: speedup udp receive path, Eric Dumazet, (Sat May 1, 4:42 am)
Re: [PATCH net-next-2.6] net: speedup udp receive path, Eric Dumazet, (Sat May 1, 6:22 am)
Re: OFT - reserving CPU's for networking, Martin Josefsson, (Sat May 1, 1:31 pm)
Re: OFT - reserving CPU's for networking, David Miller, (Sat May 1, 3:03 pm)
Re: OFT - reserving CPU's for networking, David Miller, (Sat May 1, 3:13 pm)
Re: OFT - reserving CPU's for networking, Andi Kleen, (Sat May 1, 3:58 pm)
Re: OFT - reserving CPU's for networking, David Miller, (Sat May 1, 4:29 pm)
Re: OFT - reserving CPU's for networking, Ben Hutchings, (Sat May 1, 4:44 pm)