From: Benjamin LaHaise <bcrl@kvack.org>
To: Ben Greear <greearb@candelatech.com>
Cc: netdev <netdev@vger.kernel.org>
Subject: Re: pre-fetching skb for delayed send
Date: Sat, 7 Jul 2012 10:18:08 -0400 [thread overview]
Message-ID: <20120707141808.GE19462@kvack.org> (raw)
In-Reply-To: <4FF7B7E1.4000602@candelatech.com>
On Fri, Jul 06, 2012 at 09:15:29PM -0700, Ben Greear wrote:
> Well, to start with..I at least know the next skb to transmit,
> so I figured I'd prefetch it before starting tx of the current
> skb.
Prefetching data you're just about to immediately access doesn't actually
help improve performance -- it's better to just access the data. Prefetching
subsequent skbs should be of more benefit.
> My question is more basic though: Given an skb, how do you prefetch
> it...do you just prefetch the skb pointer, or do you need to dig into
> the guts of the skb?
See prefetch.h for details. Just pass the pointer to the cacheline you want
to trigger prefetch on to prefetch() or prefetchw(), or use prefetch_range()
(probably useful for skbs given that they're larger than one cacheline).
For an skb, you may have to prefetch the frag list as well.
-ben
--
"Thought is the essence of where you are now."
prev parent reply other threads:[~2012-07-07 14:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-06 23:10 pre-fetching skb for delayed send Ben Greear
2012-07-06 23:52 ` Benjamin LaHaise
2012-07-07 4:15 ` Ben Greear
2012-07-07 14:18 ` Benjamin LaHaise [this message]
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=20120707141808.GE19462@kvack.org \
--to=bcrl@kvack.org \
--cc=greearb@candelatech.com \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).