Merge ~dipietro-salvatore/ubuntu/+source/nginx:arm64-moutline-atomics into ubuntu/+source/nginx:ubuntu/focal-security

Proposed by Salvatore
Status: Needs review
Proposed branch: ~dipietro-salvatore/ubuntu/+source/nginx:arm64-moutline-atomics
Merge into: ubuntu/+source/nginx:ubuntu/focal-security
Diff against target: 13 lines (+2/-0)
1 file modified
debian/rules (+2/-0)
Reviewer Review Type Date Requested Status
Łukasz Zemczak (community) Needs Information
git-ubuntu import Pending
Review via email:

Commit message

Add GCC atomic support (-moutline-atomics) for arm64

Description of the change

Add "-moutline-atomics" cflag for arm64 architecture since it is not active by default on GCC 9. Without this flag, the CPU doesn't use atomics instructions resulting in poor performance and CPU saturation. With this change, NGINX does not produce STREX failing operations anymore (observable with perf tool).

To post a comment you must log in.
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Thank you for the proposed change. Could you fill in a bug for this, attach it to this MP (via the "Link a bug report" button) and subscribe ubuntu-sponsors there? As this is a change proposed to focal, this requires a bit discussion. Like, is there a regression potential here? What's the state of this in newer Ubuntu series? Is it focal specific?

A bug is a much better place for such discussions, and also a better anchor for the security team (or the maintainers of nginx packages) to find and participate.

review: Needs Information

Unmerged commits

8326751... by Salvatore

Add GCC atomic support (-moutline-atomics) for arm64

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/rules b/debian/rules
2index 655a7e5..3c72c18 100755
3--- a/debian/rules
4+++ b/debian/rules
5@@ -35,6 +35,8 @@ $(foreach flavour,$(FLAVOURS),$(eval BUILDDIR_$(flavour) = $(CURDIR)/debian/buil
6 DEB_BUILD_ARCH ?=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
7 ifeq ($(DEB_BUILD_ARCH),sparc)
8 debian_cflags += -m32 -mcpu=ultrasparc
9+else ifeq ($(DEB_BUILD_ARCH),arm64)
10+ debian_cflags += -moutline-atomics
11 endif
13 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))


People subscribed via source and target branches