Messages in this thread Patch in this message | | | Date | Mon, 27 Dec 2004 19:05:10 +0300 | From | Oleg Nesterov <> | Subject | [PATCH] optimize prefetch() usage in skb_queue_walk() |
| |
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, - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |