From: Oleg Nesterov <oleg@tv-sign.ru>
To: linux-kernel@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>, Andrew Morton <akpm@osdl.org>
Subject: [PATCH] optimize prefetch() usage in skb_queue_walk()
Date: Mon, 27 Dec 2004 19:05:10 +0300 [thread overview]
Message-ID: <41D032B6.E5D3D00C@tv-sign.ru> (raw)
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,
next reply other threads:[~2004-12-27 15:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-27 16:05 Oleg Nesterov [this message]
2004-12-28 5:52 ` David S. Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41D032B6.E5D3D00C@tv-sign.ru \
--to=oleg@tv-sign.ru \
--cc=akpm@osdl.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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