]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
reef: run-make-check: use get_processors in run-make-check script 58872/head
authorJohn Mulligan <jmulligan@redhat.com>
Tue, 1 Nov 2022 14:03:31 +0000 (10:03 -0400)
committerKyr Shatskyy <kyrylo.shatskyy@gmail.com>
Fri, 26 Jul 2024 11:19:45 +0000 (13:19 +0200)
Signed-off-by: John Mulligan <jmulligan@redhat.com>
(cherry picked from commit 7edc4309f4781362f86fd83fd2d53eba42e5f73f)

Conflicts:
run-make-check.sh

run-make-check.sh

index 627430387398502c10ac189437d9f17e22e5feb4..096e3c6c8e1cd000c65aa637af1fe242cb449793 100755 (executable)
@@ -37,10 +37,14 @@ function run() {
     # increase the aio-max-nr, which is by default 65536. we could reach this
     # limit while running seastar tests and bluestore tests.
     local m=16
-    if [ $(nproc) -gt $m ]; then
-        m=$(nproc)
+    local procs="$(($(get_processors) * 2))"
+    if [ "${procs}" -gt $m ]; then
+        m="${procs}"
+    fi
+    local aiomax="$((65536 * procs))"
+    if [ "$(/sbin/sysctl -n fs.aio-max-nr )" -lt "${aiomax}" ]; then
+        $DRY_RUN sudo /sbin/sysctl -q -w fs.aio-max-nr="${aiomax}"
     fi
-    $DRY_RUN sudo /sbin/sysctl -q -w fs.aio-max-nr=$((65536 * $(nproc)))
 
     CHECK_MAKEOPTS=${CHECK_MAKEOPTS:-$DEFAULT_MAKEOPTS}
     if in_jenkins; then