Re: This patch triggers a bad gcc bug (was Re: [PATCH] force inlining of some byteswap operations)

2016-04-19 Thread Ingo Molnar
* Josh Poimboeuf wrote: > On Sat, Apr 16, 2016 at 11:03:32AM +0200, Ingo Molnar wrote: > > > > * Josh Poimboeuf wrote: > > > > > > I don't think we know yet if there's a reliable way to turn the bug off. > > > > > > > > Also, according to the gcc guys, this bug won't always result in a > > >

Re: This patch triggers a bad gcc bug (was Re: [PATCH] force inlining of some byteswap operations)

2016-04-18 Thread Arnd Bergmann
On Monday 18 April 2016 09:12:41 Josh Poimboeuf wrote: > On Mon, Apr 18, 2016 at 04:07:51PM +0200, Arnd Bergmann wrote: > > On Monday 18 April 2016 08:39:32 Josh Poimboeuf wrote: > > > > > > I agree. So how should we work around the bug in this case? There have > > > been several suggestions: >

Re: This patch triggers a bad gcc bug (was Re: [PATCH] force inlining of some byteswap operations)

2016-04-18 Thread Arnd Bergmann
On Monday 18 April 2016 08:39:32 Josh Poimboeuf wrote: > > I agree. So how should we work around the bug in this case? There have > been several suggestions: > > - change wwn_to_u64() to __always_inline > > - change qla2x00_get_host_fabric_name() to skip the unnecessary call to > wwn_to_u64(

Re: This patch triggers a bad gcc bug (was Re: [PATCH] force inlining of some byteswap operations)

2016-04-18 Thread Josh Poimboeuf
On Mon, Apr 18, 2016 at 04:07:51PM +0200, Arnd Bergmann wrote: > On Monday 18 April 2016 08:39:32 Josh Poimboeuf wrote: > > > > I agree. So how should we work around the bug in this case? There have > > been several suggestions: > > > > - change wwn_to_u64() to __always_inline > > > > - change

Re: This patch triggers a bad gcc bug (was Re: [PATCH] force inlining of some byteswap operations)

2016-04-18 Thread Josh Poimboeuf
On Sat, Apr 16, 2016 at 11:03:32AM +0200, Ingo Molnar wrote: > > * Josh Poimboeuf wrote: > > > > I don't think we know yet if there's a reliable way to turn the bug off. > > > > > > Also, according to the gcc guys, this bug won't always result in a > > > truncated function, and may sometimes ju

Re: This patch triggers a bad gcc bug (was Re: [PATCH] force inlining of some byteswap operations)

2016-04-18 Thread Josh Poimboeuf
On Sat, Apr 16, 2016 at 09:42:37AM +0200, Arnd Bergmann wrote: > On Friday 15 April 2016 07:45:19 Ingo Molnar wrote: > > > > * Denys Vlasenko wrote: > > > > > > In fact, the following patch seems to fix it: > > > > > > > > diff --git a/include/scsi/scsi_transport_fc.h > > > > b/include/scsi/sc

Re: This patch triggers a bad gcc bug (was Re: [PATCH] force inlining of some byteswap operations)

2016-04-16 Thread Ingo Molnar
* Josh Poimboeuf wrote: > > I don't think we know yet if there's a reliable way to turn the bug off. > > > > Also, according to the gcc guys, this bug won't always result in a > > truncated function, and may sometimes just make some inline function > > call sites disappear: > > > > https://g

Re: This patch triggers a bad gcc bug (was Re: [PATCH] force inlining of some byteswap operations)

2016-04-16 Thread Arnd Bergmann
On Friday 15 April 2016 07:45:19 Ingo Molnar wrote: > > * Denys Vlasenko wrote: > > > > In fact, the following patch seems to fix it: > > > > > > diff --git a/include/scsi/scsi_transport_fc.h > > > b/include/scsi/scsi_transport_fc.h > > > index bf66ea6..56b9e81 100644 > > > --- a/include/scsi/

Re: This patch triggers a bad gcc bug (was Re: [PATCH] force inlining of some byteswap operations)

2016-04-15 Thread Josh Poimboeuf
On Fri, Apr 15, 2016 at 08:47:45AM -0500, Josh Poimboeuf wrote: > On Fri, Apr 15, 2016 at 07:45:19AM +0200, Ingo Molnar wrote: > > > > * Denys Vlasenko wrote: > > > > > > In fact, the following patch seems to fix it: > > > > > > > > diff --git a/include/scsi/scsi_transport_fc.h > > > > b/inclu

Re: This patch triggers a bad gcc bug (was Re: [PATCH] force inlining of some byteswap operations)

2016-04-15 Thread Josh Poimboeuf
On Fri, Apr 15, 2016 at 07:45:19AM +0200, Ingo Molnar wrote: > > * Denys Vlasenko wrote: > > > > In fact, the following patch seems to fix it: > > > > > > diff --git a/include/scsi/scsi_transport_fc.h > > > b/include/scsi/scsi_transport_fc.h > > > index bf66ea6..56b9e81 100644 > > > --- a/incl

Re: This patch triggers a bad gcc bug (was Re: [PATCH] force inlining of some byteswap operations)

2016-04-14 Thread Ingo Molnar
* Denys Vlasenko wrote: > > In fact, the following patch seems to fix it: > > > > diff --git a/include/scsi/scsi_transport_fc.h > > b/include/scsi/scsi_transport_fc.h > > index bf66ea6..56b9e81 100644 > > --- a/include/scsi/scsi_transport_fc.h > > +++ b/include/scsi/scsi_transport_fc.h > > @@

Re: This patch triggers a bad gcc bug (was Re: [PATCH] force inlining of some byteswap operations)

2016-04-14 Thread Denys Vlasenko
On 04/14/2016 05:57 PM, Josh Poimboeuf wrote: > On Thu, Apr 14, 2016 at 05:29:06PM +0200, Denys Vlasenko wrote: >> On 04/13/2016 07:10 PM, Josh Poimboeuf wrote: From the disassembly of drivers/scsi/qla2xxx/qla_attr.o: 2f53 : 2f53: 55

Re: This patch triggers a bad gcc bug (was Re: [PATCH] force inlining of some byteswap operations)

2016-04-14 Thread Josh Poimboeuf
On Thu, Apr 14, 2016 at 05:29:06PM +0200, Denys Vlasenko wrote: > On 04/13/2016 07:10 PM, Josh Poimboeuf wrote: > >> From the disassembly of drivers/scsi/qla2xxx/qla_attr.o: > >> > >> 2f53 : > >> 2f53: 55 push %rbp > >> 2f54:

Re: This patch triggers a bad gcc bug (was Re: [PATCH] force inlining of some byteswap operations)

2016-04-14 Thread Denys Vlasenko
On 04/13/2016 07:10 PM, Josh Poimboeuf wrote: >> From the disassembly of drivers/scsi/qla2xxx/qla_attr.o: >> >> 2f53 : >> 2f53: 55 push %rbp >> 2f54: 48 89 e5mov%rsp,%rbp >> >> 2f57 :

Re: This patch triggers a bad gcc bug (was Re: [PATCH] force inlining of some byteswap operations)

2016-04-13 Thread Josh Poimboeuf
On Wed, Apr 13, 2016 at 09:55:09AM -0700, James Bottomley wrote: > On Wed, 2016-04-13 at 10:15 -0500, Josh Poimboeuf wrote: > > On Wed, Apr 13, 2016 at 07:36:07AM -0500, Josh Poimboeuf wrote: > > > On Wed, Apr 13, 2016 at 02:12:25PM +0200, Denys Vlasenko wrote: > > > > On 04/13/2016 05:36 AM, Josh

Re: This patch triggers a bad gcc bug (was Re: [PATCH] force inlining of some byteswap operations)

2016-04-13 Thread James Bottomley
On Wed, 2016-04-13 at 10:15 -0500, Josh Poimboeuf wrote: > On Wed, Apr 13, 2016 at 07:36:07AM -0500, Josh Poimboeuf wrote: > > On Wed, Apr 13, 2016 at 02:12:25PM +0200, Denys Vlasenko wrote: > > > On 04/13/2016 05:36 AM, Josh Poimboeuf wrote: > > > > On Thu, Feb 04, 2016 at 08:45:35PM +0100, Denys

Re: This patch triggers a bad gcc bug (was Re: [PATCH] force inlining of some byteswap operations)

2016-04-13 Thread Josh Poimboeuf
On Wed, Apr 13, 2016 at 07:36:07AM -0500, Josh Poimboeuf wrote: > On Wed, Apr 13, 2016 at 02:12:25PM +0200, Denys Vlasenko wrote: > > On 04/13/2016 05:36 AM, Josh Poimboeuf wrote: > > > On Thu, Feb 04, 2016 at 08:45:35PM +0100, Denys Vlasenko wrote: > > >> Sometimes gcc mysteriously doesn't inline

Re: This patch triggers a bad gcc bug (was Re: [PATCH] force inlining of some byteswap operations)

2016-04-13 Thread Josh Poimboeuf
On Wed, Apr 13, 2016 at 02:12:25PM +0200, Denys Vlasenko wrote: > On 04/13/2016 05:36 AM, Josh Poimboeuf wrote: > > On Thu, Feb 04, 2016 at 08:45:35PM +0100, Denys Vlasenko wrote: > >> Sometimes gcc mysteriously doesn't inline > >> very small functions we expect to be inlined. See > >> https://

Re: This patch triggers a bad gcc bug (was Re: [PATCH] force inlining of some byteswap operations)

2016-04-13 Thread Denys Vlasenko
On 04/13/2016 05:36 AM, Josh Poimboeuf wrote: > On Thu, Feb 04, 2016 at 08:45:35PM +0100, Denys Vlasenko wrote: >> Sometimes gcc mysteriously doesn't inline >> very small functions we expect to be inlined. See >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66122 >> >> With this .config: >> htt

This patch triggers a bad gcc bug (was Re: [PATCH] force inlining of some byteswap operations)

2016-04-12 Thread Josh Poimboeuf
On Thu, Feb 04, 2016 at 08:45:35PM +0100, Denys Vlasenko wrote: > Sometimes gcc mysteriously doesn't inline > very small functions we expect to be inlined. See > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66122 > > With this .config: > http://busybox.net/~vda/kernel_config_OPTIMIZE_INLINING_

Re: [PATCH] force inlining of some byteswap operations

2016-02-04 Thread Ingo Molnar
* Denys Vlasenko wrote: > Sometimes gcc mysteriously doesn't inline > very small functions we expect to be inlined. See > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66122 > > With this .config: > http://busybox.net/~vda/kernel_config_OPTIMIZE_INLINING_and_Os, > the following functions get