* [PATCH] optimize prefetch() usage in skb_queue_walk()
@ 2004-12-27 16:05 Oleg Nesterov
2004-12-28 5:52 ` David S. Miller
0 siblings, 1 reply; 2+ messages in thread
From: Oleg Nesterov @ 2004-12-27 16:05 UTC (permalink / raw)
To: linux-kernel; +Cc: David S. Miller, Andrew Morton
Hello.
This patch changes skb_queue_walk() in the same manner
as in list_for_each() prefetch optimization, see
http://marc.theaimsgroup.com/?l=linux-kernel&m=110399132418587
Oleg.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
--- 2.6.10/include/linux/skbuff.h~ 2004-12-26 12:52:43.000000000 +0300
+++ 2.6.10/include/linux/skbuff.h 2004-12-26 12:54:33.000000000 +0300
@@ -1071,9 +1071,9 @@
}
#define skb_queue_walk(queue, skb) \
- for (skb = (queue)->next, prefetch(skb->next); \
- (skb != (struct sk_buff *)(queue)); \
- skb = skb->next, prefetch(skb->next))
+ for (skb = (queue)->next; \
+ prefetch(skb->next), (skb != (struct sk_buff *)(queue)); \
+ skb = skb->next)
extern struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags,
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-12-28 7:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-27 16:05 [PATCH] optimize prefetch() usage in skb_queue_walk() Oleg Nesterov
2004-12-28 5:52 ` David S. Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome