lkml.org 
[lkml]   [2004]   [Aug]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] [LSM] Rework LSM hooks
* David Mosberger (davidm@napali.hpl.hp.com) wrote:
> >>>>> On Tue, 10 Aug 2004 16:31:12 -0400 (EDT), James Morris <jmorris@redhat.com> said:
>
> James> On Tue, 10 Aug 2004, Chris Wright wrote:
> >> Thanks, James. Since these are the only concrete numbers and
> >> they are in the noise, I see no compelling reason to change to
> >> unlikely().
>
> James> There may be some way to make it ia64 specific. Is it a cpu
> James> issue, or compiler?
>
> I'm pretty sure the "unlikely()" part could be dropped with little/no
> downside. The part that's relatively expensive (10 cycles when
> mispredicted) is the indirect call. GCC doesn't handle this well on
> ia64 and as a result, most indirect calls are mispredicted.
>
> An alternative solution might be to have a call_likely() macro, where
> you could predict the most likely target of an indirect call. Perhaps
> that could help other platforms as well.

Hmm, the pointers are generally quite static, set once near boot time
typically, and that's it. Seems like a plausible win. Do you have an
example of what call_likely() would look like?

thanks,
-chris
--
Linux Security Modules http://lsm.immunix.org http://lsm.bkbits.net
-
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/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.077 / U:39.716 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site