Activity log for bug #1667407

Date Who What changed Old value New value Message
2017-02-23 17:40:52 Gustavo Serra Scalet bug added bug
2017-02-24 15:52:13 Brian Murray tags regression-release regression-release yakkety
2017-02-24 15:53:04 Brian Murray bug watch added http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=854053
2017-02-24 15:53:04 Brian Murray bug task added coreutils (Debian)
2017-02-24 15:53:20 Brian Murray coreutils (Ubuntu): assignee Matthias Klose (doko)
2017-02-25 04:20:44 Bug Watch Updater coreutils (Debian): status Unknown Fix Released
2017-02-28 09:17:43 Matthias Klose nominated for series Ubuntu Yakkety
2017-02-28 09:17:43 Matthias Klose bug task added coreutils (Ubuntu Yakkety)
2017-02-28 09:17:43 Matthias Klose nominated for series Ubuntu Xenial
2017-02-28 09:17:43 Matthias Klose bug task added coreutils (Ubuntu Xenial)
2017-02-28 09:31:07 Matthias Klose coreutils (Ubuntu): status New Fix Released
2017-03-02 15:48:31 Gustavo Serra Scalet description Dear Maintainer, The sha256sum provided by coreutils (without openssl) is performing poorly with gcc versions >= 4.9 until 7.0 (currently under development). The reason for that is the -fschedule-insns optimization that is used with -O2. By simply deactivating it, there is a performance improvement of 2 to 3 times. I'm using Ubuntu 16.10 and the coreutils package version 8.25-2ubuntu2. Please check the following closed debian bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=854053 Be aware of the following conditions that are required: * If ppc64le * If gcc being used is >= 4.9 and < 7.0 Notes: 1) gcc-7 is not affected by this bug (verified on 20170129 snapshot). 2) clang is not affected by this bug (verified on v3.8 and v3.9). 3) strangely the sha512 is not affected by this. Below a demonstration of how it performs on my POWER8 machine: =================================================== $ (./configure && make -j9) > /dev/null && time src/sha256sum ~/ubuntu-16.10-server-ppc64el.iso configure: WARNING: libacl development library was not found or not usable. configure: WARNING: GNU coreutils will be built without ACL support. configure: WARNING: libattr development library was not found or not usable. configure: WARNING: GNU coreutils will be built without xattr support. configure: WARNING: libcap library was not found or not usable. configure: WARNING: GNU coreutils will be built without capability support. configure: WARNING: libgmp development library was not found or not usable. configure: WARNING: GNU coreutils will be built without GMP support. src/who.c: In function 'print_user': src/who.c:454:20: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] int *a = utmp_ent->ut_addr_v6; ^~~~~~~~ d14bdb413ea6cdc8d9354fcbc37a834b7de0c23f992deb0c6764d0fd5d65408e /home/gut/ubuntu-16.10-server-ppc64el.iso real 0m18.670s user 0m16.566s sys 0m0.745s $ # now with the following patch: ## Check Michael Stone's patch for an improved version. $ diff Makefile.in ../Makefile.in 8989c8989 < @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ --- > @am__fastdepCC_TRUE@ $(COMPILE) $$([ "$@" == "lib/sha256.o" ] && echo "-fno-schedule-insns") -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ $ cp ../Makefile.in Makefile.in $ (./configure && make -j9) > /dev/null && time src/sha256sum ~/ubuntu-16.10-server-ppc64el.iso configure: WARNING: libacl development library was not found or not usable. configure: WARNING: GNU coreutils will be built without ACL support. configure: WARNING: libattr development library was not found or not usable. configure: WARNING: GNU coreutils will be built without xattr support. configure: WARNING: libcap library was not found or not usable. configure: WARNING: GNU coreutils will be built without capability support. configure: WARNING: libgmp development library was not found or not usable. configure: WARNING: GNU coreutils will be built without GMP support. src/who.c: In function 'print_user': src/who.c:454:20: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] int *a = utmp_ent->ut_addr_v6; ^~~~~~~~ d14bdb413ea6cdc8d9354fcbc37a834b7de0c23f992deb0c6764d0fd5d65408e /home/gut/ubuntu-16.10-server-ppc64el.iso real 0m5.903s user 0m5.560s sys 0m0.255s [Impact] * Performance drop of 2x-3x on ppc64le when using sha256sum * Please backport this bug to last LTS as this application is widely used. * This fix is due to a optimization issue found on gcc v4.9 to gcc v7.0. [Test Case] * Run sha256sum with a big file and measure the time it takes. The patch improves this timing up to 3 times faster. [Regression Potential] * This patch is specifically for the sha256.o object, affecting only this binary. [Other Info] Michael Stone's improved patch: Index: coreutils-8.26/Makefile.in =================================================================== --- coreutils-8.26.orig/Makefile.in 2016-11-30 13:34:55.000000000 -0500 +++ coreutils-8.26/Makefile.in 2017-02-22 07:18:55.352394058 -0500 @@ -14661,6 +14661,10 @@ $(TEST_LOGS): $(PROGRAMS) +ifeq ($(DEB_TARGET_ARCH), ppc64el) +lib/sha256.o: CFLAGS+=-fno-schedule-insns +endif + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: Original bug description: The sha256sum provided by coreutils (without openssl) is performing poorly with gcc versions >= 4.9 until 7.0 (currently under development). The reason for that is the -fschedule-insns optimization that is used with -O2. By simply deactivating it, there is a performance improvement of 2 to 3 times. I'm using Ubuntu 16.10 and the coreutils package version 8.25-2ubuntu2. Please check the following closed debian bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=854053 Be aware of the following conditions that are required: * If ppc64le * If gcc being used is >= 4.9 and < 7.0 Notes: 1) gcc-7 is not affected by this bug (verified on 20170129 snapshot). 2) clang is not affected by this bug (verified on v3.8 and v3.9). 3) strangely the sha512 is not affected by this. Below a demonstration of how it performs on my POWER8 machine: =================================================== $ (./configure && make -j9) > /dev/null && time src/sha256sum ~/ubuntu-16.10-server-ppc64el.iso configure: WARNING: libacl development library was not found or not usable. configure: WARNING: GNU coreutils will be built without ACL support. configure: WARNING: libattr development library was not found or not usable. configure: WARNING: GNU coreutils will be built without xattr support. configure: WARNING: libcap library was not found or not usable. configure: WARNING: GNU coreutils will be built without capability support. configure: WARNING: libgmp development library was not found or not usable. configure: WARNING: GNU coreutils will be built without GMP support. src/who.c: In function 'print_user': src/who.c:454:20: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]          int *a = utmp_ent->ut_addr_v6;                     ^~~~~~~~ d14bdb413ea6cdc8d9354fcbc37a834b7de0c23f992deb0c6764d0fd5d65408e /home/gut/ubuntu-16.10-server-ppc64el.iso real 0m18.670s user 0m16.566s sys 0m0.745s $ # now with the following patch: ## Check Michael Stone's patch for an improved version. $ diff Makefile.in ../Makefile.in 8989c8989 < @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ --- > @am__fastdepCC_TRUE@ $(COMPILE) $$([ "$@" == "lib/sha256.o" ] && echo "-fno-schedule-insns") -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ $ cp ../Makefile.in Makefile.in $ (./configure && make -j9) > /dev/null && time src/sha256sum ~/ubuntu-16.10-server-ppc64el.iso configure: WARNING: libacl development library was not found or not usable. configure: WARNING: GNU coreutils will be built without ACL support. configure: WARNING: libattr development library was not found or not usable. configure: WARNING: GNU coreutils will be built without xattr support. configure: WARNING: libcap library was not found or not usable. configure: WARNING: GNU coreutils will be built without capability support. configure: WARNING: libgmp development library was not found or not usable. configure: WARNING: GNU coreutils will be built without GMP support. src/who.c: In function 'print_user': src/who.c:454:20: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]          int *a = utmp_ent->ut_addr_v6;                     ^~~~~~~~ d14bdb413ea6cdc8d9354fcbc37a834b7de0c23f992deb0c6764d0fd5d65408e /home/gut/ubuntu-16.10-server-ppc64el.iso real 0m5.903s user 0m5.560s sys 0m0.255s
2017-03-02 18:00:34 Brian Murray coreutils (Ubuntu Yakkety): status New Fix Committed
2017-03-02 18:00:36 Brian Murray bug added subscriber Ubuntu Stable Release Updates Team
2017-03-02 18:00:39 Brian Murray bug added subscriber SRU Verification
2017-03-02 18:00:48 Brian Murray tags regression-release yakkety regression-release verification-needed yakkety
2017-03-02 18:01:33 Brian Murray coreutils (Ubuntu Xenial): status New Fix Committed
2017-03-03 17:14:52 Gustavo Serra Scalet tags regression-release verification-needed yakkety regression-release verification-done yakkety
2017-03-27 07:33:00 Robie Basak tags regression-release verification-done yakkety regression-release verification-done-yakkety yakkety
2017-03-27 07:33:18 Launchpad Janitor coreutils (Ubuntu Yakkety): status Fix Committed Fix Released
2017-03-27 07:33:23 Robie Basak removed subscriber Ubuntu Stable Release Updates Team
2017-06-26 19:29:23 Ubuntu Foundations Team Bug Bot tags regression-release verification-done-yakkety yakkety regression-release removal-candidate verification-done-yakkety yakkety
2017-06-26 19:54:10 Gustavo Serra Scalet tags regression-release removal-candidate verification-done-yakkety yakkety regression-release verification-done-xenial verification-done-yakkety yakkety
2017-06-27 11:04:58 Matthias Klose tags regression-release verification-done-xenial verification-done-yakkety yakkety regression-release verification-done verification-done-xenial verification-done-yakkety yakkety
2017-06-28 11:59:50 Gustavo Serra Scalet tags regression-release verification-done verification-done-xenial verification-done-yakkety yakkety regression-release verification-done-xenial verification-done-yakkety yakkety
2017-07-07 00:13:58 Launchpad Janitor coreutils (Ubuntu Xenial): status Fix Committed Fix Released