From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: louis.chauvet@bootlin.com, Buildroot List <buildroot@buildroot.org>
Subject: Re: [Buildroot] [PATCH] Config.in: change default optimization level from -Os to -O2
Date: Tue, 2 Jan 2024 09:39:04 +0100 [thread overview]
Message-ID: <20240102093904.5625d379@windsurf> (raw)
In-Reply-To: <ZYxfxXC4-vKZlmcZ@landeda>
Hello,
Thanks for the feedback.
On Wed, 27 Dec 2023 18:32:53 +0100
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> > Here are some arguments in favor of this change:
> >
> > - Most Buildroot uses use Buildroot for platforms that have a
>
> s/uses/users/ maybe?
>
> > reasonable amount of storage, and the difference between -Os and -O2
> > in terms of code size is no longer than significant compared to the
>
> s/than/as/
>
> > size of storage typically available on average embedded Linux
> > devices
>
> ... nowadays.
I sent a v2 (where I messed up) and then a v3, fixing those. I actually
made another change: the Config.in help text of BR2_OPTIMIZE_S
explicitly mentioned that it was the default. So I updated this and
moved the text to BR2_OPTIMIZE_2.
>
> > - -Os can have a pretty bad performance impact, compared to -O2.
>
> What impact are we speaking of? Basically, -Os is -O2 except for
> optimisations that increase code size. Also, smaller code fit better
> in caches, so there can be a speed gain to have smaller code too.
>
> So, stating that -Os has a "pretty bad" performance impact is not that
> obvious.
I obviously don't have hard numbers, but I definitely remember
getting reports of performance problems that got solved by moving to
-O2. However, I honestly don't remember if it was a bug report in our
public bug tracker, or an issue in a customer project. But I had in my
TODO-list for a long time to send this patch, because on multiple
occasions I saw people being hit by issues being caused by the default
setting of -Os.
> Acked-by: Yann E. MORIN <yann.morin.1998@free.fr>
Thanks, the v3 has your Acked-by :-)
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2024-01-02 8:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-27 16:58 [Buildroot] [PATCH] Config.in: change default optimization level from -Os to -O2 Thomas Petazzoni via buildroot
2023-12-27 17:32 ` Yann E. MORIN
2024-01-02 8:39 ` Thomas Petazzoni via buildroot [this message]
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=20240102093904.5625d379@windsurf \
--to=buildroot@buildroot.org \
--cc=louis.chauvet@bootlin.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=yann.morin.1998@free.fr \
/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