public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: Michal Marek <mmarek@suse.cz>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com>,
	"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: subtle side effect of commit a1c48bb160f836
Date: Thu, 18 Jun 2015 10:13:29 +0200	[thread overview]
Message-ID: <20150618081329.GA9434@pobox.suse.cz> (raw)
In-Reply-To: <CAMuHMdXWHYF8hEEgeFxLTrhvmEDBVS2=VmKykfOtDkGjqODQbA@mail.gmail.com>

On Thu, Jun 18, 2015 at 09:10:30AM +0200, Geert Uytterhoeven wrote:
> Hi Vineet,
> 
> On Thu, Jun 18, 2015 at 8:47 AM, Vineet Gupta
> <Vineet.Gupta1@synopsys.com> wrote:
> > commit a1c48bb160f8368 "Makefile: Fix unrecognized cross-compiler command line
> > options" moved ARCH specific cc option handling before common -Os/O2 setup.
> >
> > For ARC this had a subtle effect that we can no longer over-ride generic -O2 with
> > -O3, hence a performance regression observed going from 3.13 to 3.18 (the above
> > commit went into 3.16)
> >
> > I want to understand how to properly fix this. Moving the include of arch makefile
> > will bring back the old issue. I can introduce another option to set default optim
> > level, but only arc/m32r care about it anyways.

m32r only sets -O for its assembler.


> Can we include $(srctree)/arch/$(SRCARCH)/Makefile twice?

Please don't, the gcc commandline is long enough already.


> Or perhaps we can not apply the extra -O* if there's already a -O* option?
> 
> Alternatively, as we already have CONFIG_CC_OPTIMIZE_FOR_SIZE,
> a(nother) Kconfig option may make sense.

We can also introduce some ARCH_CFLAGS that is appended near the end of
the list, and have arc/Makefile add its -O3 there. But I'd like to why
the -O3 needs to be there in first place. Obviously, the kernel works
with -O2, otherwise the regression would have been identified earlier.
So why can't users specify -O3 in KCFLAGS like on any other
architecture.

Michal

  parent reply	other threads:[~2015-06-18  8:13 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-18  6:47 subtle side effect of commit a1c48bb160f836 Vineet Gupta
2015-06-18  7:10 ` Geert Uytterhoeven
2015-06-18  7:33   ` Vineet Gupta
2015-06-18  7:37     ` Geert Uytterhoeven
2015-06-18  8:00       ` Vineet Gupta
2015-06-18  8:13   ` Michal Marek [this message]
2015-06-18  8:45     ` Vineet Gupta
2015-06-18  8:45       ` Vineet Gupta
2015-06-18  8:55       ` Geert Uytterhoeven
2015-06-18  8:55         ` Geert Uytterhoeven
2015-06-18  9:16         ` Vineet Gupta
2015-06-18 10:14       ` Michal Marek
2015-06-18 10:32         ` Vineet Gupta
2015-06-24 12:20           ` Vineet Gupta
2015-07-01 15:19             ` Michal Marek
2015-07-01 15:19               ` Michal Marek
2015-07-02  5:27               ` ARC build -O3 (was Re: subtle side effect of commit a1c48bb160f836) Vineet Gupta
2015-07-02  5:27                 ` Vineet Gupta
2015-07-02 19:50                 ` Michal Marek
2015-07-03  2:58                   ` Vineet Gupta

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=20150618081329.GA9434@pobox.suse.cz \
    --to=mmarek@suse.cz \
    --cc=Vineet.Gupta1@synopsys.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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