]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-dev-*-setup: do not specify ALLOCATOR 1814/head
authorKefu Chai <kchai@redhat.com>
Sat, 15 May 2021 11:32:11 +0000 (19:32 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 15 May 2021 12:49:23 +0000 (20:49 +0800)
$DIST env variable is not set by ceph-dev-new-setup, as it prepares
the dist tarball for building on different distros. to build with
tcmalloc if gperftools 2.6.2 is available, we leave it to cmake to
decide the allocator to use. because, if ALLOCATOR is not specified,
cmake first tries to find gperftools, and falls back to JeMalloc, and
the libc allocator. after quincy, the fix for gperftools <2.6.2 is
dropped, and gperftools >= 2.6.2 is required, so it's safe. before
quincy, the fix gperftools <2.6.2 is still included, so it's also safe.

Signed-off-by: Kefu Chai <kchai@redhat.com>
ceph-dev-new-setup/build/build
ceph-dev-setup/build/build
scripts/build_utils.sh

index 11cc19d2b74b7e2a8e7a0052c1b664126a24cac2..344345c812a8ecab4135fd76ccab2f914f0c4a13 100644 (file)
@@ -64,7 +64,7 @@ else
     echo "forcing."
 fi
 
-ceph_build_args_from_flavor_and_dist ${FLAVOR} ${DIST}
+ceph_build_args_from_flavor ${FLAVOR}
 
 mkdir -p release
 
index bf94b27d90ef4de84863320a4aa25e76a61f6e32..ed60f7961abfa8bca0ab23cb031154d133260501 100644 (file)
@@ -36,7 +36,7 @@ rm -rf release
 echo "Running submodule update ..."
 git submodule update --init
 
-ceph_build_args_from_flavor_and_dist ${FLAVOR} ${DIST}
+ceph_build_args_from_flavor ${FLAVOR}
 
 # When using autotools/autoconf it is possible to see output from `git diff`
 # since some macros can be copied over to the ceph source, triggering this
index ba5005f27bdabc0541e020538e06dccb83d15906..f5a255b9a8f47a6f980cf6fa9e824ee05b1b46c1 100644 (file)
@@ -821,11 +821,9 @@ gen_debian_version() {
 # Flavor Builds support
 # - CEPH_EXTRA_RPMBUILD_ARGS is consumed by build_rpms()
 # - CEPH_EXTRA_CMAKE_ARGS is consumed by debian/rules and ceph.spec directly
-ceph_build_args_from_flavor_and_dist() {
+ceph_build_args_from_flavor() {
     local flavor=$1
     shift
-    local dist=$1
-    shift
 
     # shellcheck disable=SC2034
     case "${flavor}" in
@@ -838,17 +836,16 @@ ceph_build_args_from_flavor_and_dist() {
         # - we need to test old clients which are built on bionic. for instance, we don't build
         #   nautilus on focal yet.
         # - some upgrade tests still include bionic facets.
-        if [ "$dist" == "bionic" ]; then
-            local ver
-            ver=$(git describe --abbrev=8 --match "v*" | sed s/^v// | cut -f1 -d'.')
-            # use libc allocator when building on quincy and up on bionic
-            if [ ${ver} -lt 17 ]; then
-                CEPH_EXTRA_CMAKE_ARGS+=" -DALLOCATOR=tcmalloc"
-            fi
-        else
-            # always use tcmalloc on non-bionic dists
-            CEPH_EXTRA_CMAKE_ARGS+=" -DALLOCATOR=tcmalloc"
-        fi
+        #
+        # do not specify -DALLOCATOR=tcmalloc in CEPH_EXTRA_CMAKE_ARGS, and let
+        # cmake figure it out:
+        # - on quincy and up, gperftools 2.6.2 is required, so we are not
+        #   impacted by https://tracker.ceph.com/issues/39703. and cmake uses
+        #   tcmalloc if gperftools 2.6.2 and up is found. on bionic, cmake
+        #   falls back to libc allocator.
+        # - before quincy, since ALLOCATOR is not specified, cmake uses
+        #   tcmalloc as long as gperftools is found, and the fix of
+        #   https://tracker.ceph.com/issues/39703 is still not removed.
         ;;
     crimson)
         CEPH_EXTRA_RPMBUILD_ARGS="--with seastar"