[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20120707141808.GE19462@kvack.org>
Date: Sat, 7 Jul 2012 10:18:08 -0400
From: Benjamin LaHaise <bcrl@...ck.org>
To: Ben Greear <greearb@...delatech.com>
Cc: netdev <netdev@...r.kernel.org>
Subject: Re: pre-fetching skb for delayed send
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."
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists