Skip to content

Commit

Permalink
run-make-check: use get_processors in run-make-check script
Browse files Browse the repository at this point in the history
Signed-off-by: John Mulligan <[email protected]>
  • Loading branch information
phlogistonjohn committed Feb 7, 2023
1 parent a76a0cf commit 7edc430
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions run-make-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@ 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
if [ "$(/sbin/sysctl -n fs.aio-max-nr )" -lt "$((65536 * $(nproc)))" ]; then
$DRY_RUN sudo /sbin/sysctl -q -w fs.aio-max-nr=$((65536 * $(nproc)))
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

CHECK_MAKEOPTS=${CHECK_MAKEOPTS:-$DEFAULT_MAKEOPTS}
Expand Down

0 comments on commit 7edc430

Please sign in to comment.