lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 18 Jul 2009 23:14:29 -0700
From:	Arjan van de Ven <arjan@...radead.org>
To:	Chris Snook <chris.snook@...il.com>
Cc:	john stultz <johnstul@...ibm.com>,
	lkml <linux-kernel@...r.kernel.org>,
	Thomas Gleixner <tglx@...x.de>, Ingo Molnar <mingo@...e.hu>,
	Andi Kleen <ak@...e.de>, nikolag@...ibm.com,
	Darren Hart <dvhltc@...ibm.com>
Subject: Re: [RFC][PATCH] Introduce CLOCK_REALTIME_COARSE

On Sat, 18 Jul 2009 23:00:55 -0400
Chris Snook <chris.snook@...il.com> wrote:

> On Fri, Jul 17, 2009 at 7:39 PM, john stultz<johnstul@...ibm.com>
> wrote:
> > -       if (likely(gtod->sysctl_enabled && gtod->clock.vread))
> > +       if (likely(gtod->sysctl_enabled))
> 
> This irks me.  If the sysctl is enabled and the codepath is getting
> used often enough that we care about performance, branch prediction
> should do the right thing without compiler hints.  On the other hand,
> if the sysctl is disabled, and the compiler is telling the cpu to
> ignore its branch predictor, it'll hurt.  I don't think we should be
> wrapping (un)likely annotations around configuration options, unless
> we're biasing against debug conditions where we definitely don't care
> about performance.  The patch is certainly no worse than the existing
> code, but while we have the hood up, it might be nice to remove the
> annotation, unless we're sure that it does no harm, and does some
> good.

it's on x86.. likely/unlikely don't impact the CPU (since there are no
"ignore the branch predictor" hints), only the code placement.....

(and that's probably a good thing; CPU branch predictors are pretty
good, I'd not be surprised if they're at least as good as the
programmers who think how they code is used)


--
Arjan van de Ven 	Intel Open Source Technology Centre
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ