You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Zstd has been getting larger over the years, as we've added features and improved performance. We should take a comprehensive look at code size, and try to optimize our code size while retaining performance.
Explicitly track our code size in our tests, and monitor between releases.
Pull zstd fixes from Nick Terrell:
"Fix stack usage on parisc & improve code size bloat
This contains three commits:
1. Fixes a minor unused variable warning reported by Kernel test
robot [0].
2. Improves the reported code bloat (-88KB / 374KB) [1] by outlining
some functions that are unlikely to be used in performance
sensitive workloads.
3. Fixes the reported excess stack usage on parisc [2] by removing
-O3 from zstd's compilation flags. -O3 triggered bugs in the
hppa-linux-gnu gcc-8 compiler. -O2 performance is acceptable:
neutral compression, about -1% decompression speed. We also reduce
code bloat (-105KB / 374KB).
After this our code bloat is cut from 374KB to 105KB with gcc-11. If
we wanted to cut the remaining 105KB we'd likely have to trade
signicant performance, so I want to say that this is enough for now.
We should be able to get further gains without sacrificing speed, but
that will take some significant optimization effort, and isn't
suitable for a quick fix. I've opened an upstream issue [3] to track
the code size, and try to avoid future regressions, and improve it in
the long term"
Link: https://lore.kernel.org/linux-mm/[email protected]/T/ [0]
Link: https://lkml.org/lkml/2021/11/15/710 [1]
Link: https://lkml.org/lkml/2021/11/14/189 [2]
Link: facebook/zstd#2867 [3]
Link: https://lore.kernel.org/r/[email protected]/
Link: https://lore.kernel.org/r/[email protected]/
* tag 'zstd-for-linus-5.16-rc1' of git://github.com/terrelln/linux:
lib: zstd: Don't add -O3 to cflags
lib: zstd: Don't inline functions in zstd_opt.c
lib: zstd: Fix unused variable warning
wondering, if dropping build flags because of buggy compiler is a standard way to solve the issues.
what will happen, if -O1 became buggy on that parisc system? if something different, than in e2d0186, why this something didn't happen for -O3 bug? thanks.
Zstd has been getting larger over the years, as we've added features and improved performance. We should take a comprehensive look at code size, and try to optimize our code size while retaining performance.
a.
zstd_opt.c
is a prime target: Issue [linux-kernel] Don't add -O3 to CFLAGS #2866.b.
zstd_lazy.c
was optimized in PR [lazy] Speed up compilation times #2828, but there is still more that can be won (as mentioned in the TODO).The text was updated successfully, but these errors were encountered: