CHROMIUM: config: Switch from -Os to -O2

Default kernel builds enable CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE, which
implies compiler optimization flag -O2. CrOS kernels override that with
CONFIG_CC_OPTIMIZE_FOR_SIZE=y, which implies -Os. The kernel represents
a significant chunk of real user workloads, and so we want to roll this
tweak back, to err on the side of performance.

Local analysis shows this change can increase resulting disk usage by
about 4-6% (some in (compressed) modules on the root filesystem; some in
the vboot kernel partition), and improves some benchmarks in the range
of 1-2%.

BUG=b:340928890
TEST=lmbench, geekbench, etc. (see $BUG)
TEST=disk space - manual checks:
       `du -s /lib/modules/$(uname -r)/`
       `futility vbutil_kernel --verify ${KERN_PARTITION} | \
        grep 'Body size'`

Change-Id: I3fbcc70da0d8fe1f189cc1e7d5e4d5b8ac51a144
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5555852
Reviewed-by: Suleiman Souhlal <suleiman@google.com>
1 file changed