Commit 7ce0e70b authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Thomas Graf

[NET]: Use prefetching in skb_queue_walk().

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=110399132418587Signed-off-by: default avatarOleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 71ba6a35
...@@ -1077,9 +1077,9 @@ static inline void kunmap_skb_frag(void *vaddr) ...@@ -1077,9 +1077,9 @@ static inline void kunmap_skb_frag(void *vaddr)
} }
#define skb_queue_walk(queue, skb) \ #define skb_queue_walk(queue, skb) \
for (skb = (queue)->next, prefetch(skb->next); \ for (skb = (queue)->next; \
(skb != (struct sk_buff *)(queue)); \ prefetch(skb->next), (skb != (struct sk_buff *)(queue)); \
skb = skb->next, prefetch(skb->next)) skb = skb->next)
extern struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, extern struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment