From: Pavel Roskin <proski@gnu.org>
To: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Michael Buesch <mb@bu3sch.de>,
Johannes Berg <johannes@sipsolutions.net>,
linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 4/7] mac80211: make ieee80211_get_hdrlen_from_skb return unsigned
Date: Fri, 06 Jun 2008 16:15:57 -0400 [thread overview]
Message-ID: <1212783357.29134.5.camel@dv> (raw)
In-Reply-To: <1212778061.6340.85.camel@brick>
On Fri, 2008-06-06 at 11:47 -0700, Harvey Harrison wrote:
> unlikely() isn't some magic make-me-faster function, it just moves co=
de
> to the end of the function to get it out of the icache and jumps to i=
t
> in the unlikely case it is taken. When all there is is a return, I
> don't think it even makes any difference. In both these cases a comm=
ent
> is probably more appropriate.
If we don't more return to the end, we get something like:
compare skb->len to 10
if more or equal goto 1
return
1: <the likely case>
=EF=BB=BFI don't know much about modern processor design, but I remembe=
r reading
that even a very short jump would flush the instruction pipeline and
cause some delay.
I would keep unlikely() and let the compiler think what to do with it.
--=20
Regards,
Pavel Roskin
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2008-06-06 20:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-06 17:51 [PATCH 4/7] mac80211: make ieee80211_get_hdrlen_from_skb return unsigned Harvey Harrison
2008-06-06 18:24 ` Michael Buesch
2008-06-06 18:47 ` Harvey Harrison
2008-06-06 20:15 ` Pavel Roskin [this message]
2008-06-07 2:24 ` Harvey Harrison
2008-06-09 9:15 ` Johannes Berg
2008-06-09 16:25 ` Harvey Harrison
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=1212783357.29134.5.camel@dv \
--to=proski@gnu.org \
--cc=harvey.harrison@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=mb@bu3sch.de \
/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).