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]
Message-ID: <20150501171728.GD1657@gmail.com>
Date:	Fri, 1 May 2015 19:17:28 +0200
From:	Ingo Molnar <mingo@...nel.org>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Jakub Jelinek <jakub@...hat.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Richard Henderson <rth@...hat.com>,
	Vladimir Makarov <vmakarov@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Borislav Petkov <bp@...en8.de>
Subject: Re: [PATCH] x86: Optimize variable_test_bit()


* Peter Zijlstra <peterz@...radead.org> wrote:

> On Fri, May 01, 2015 at 06:33:29PM +0200, Jakub Jelinek wrote:
> > On Fri, May 01, 2015 at 09:03:32AM -0700, Linus Torvalds wrote:
> > > > PPS. Jakub, I see gcc5.1 still hasn't got output operands for asm goto;
> > > >      is this something we can get 'fixed' ?
> > 
> > CCing Richard as author of asm goto and Vlad as register allocator 
> > maintainer.  There are a few enhancement requests to support this, 
> > like http://gcc.gnu.org/PR59615 and http://gcc.gnu.org/PR52381 , 
> > but indeed the reason why no outputs are allowed is the register 
> > allocation issue. Don't know if LRA would be better suited to 
> > handle that case, but it would indeed be pretty hard.
> 
> So it would b awesome if we could use these freshly modeled flags as 
> output for regular asm stmts; that would obviate much of the asm 
> goto hackery we now do/have and allow gcc to pick the right branch 
> for likely/unlikely.

If I may hijack the discussion a bit: it would also be awesome if 
there was a GCC flag that would allow us to use __builtin_expect() 
hints even when automatic branch heuristics are disabled:

I.e. very similar to -fno-guess-branch-probability, just that explicit 
__builtin_expect() hints would not be ignored (like 
-fno-guess-branch-probability does it today).

We could use this to compress the kernel instruction cache footprint 
by about 5% on x86-64, while still having all the hand-made 
optimizations that __builtin_expect() allows us.

It would be a perfect solution if -fno-guess-branch-probability just 
stopped ignoring __builtin_expect().

Thanks,

	Ingo
--
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