From: Sergey Cheremencev Date: Fri, 9 Feb 2024 17:22:07 +0000 (+0300) Subject: LU-17520 tests: change DEBUG_SIZE logic X-Git-Tag: 2.15.62~177 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=fc520240ad57a7bbff990a68b8fbaff0c6ec27ae;p=fs%2Flustre-release.git LU-17520 tests: change DEBUG_SIZE logic Don't set DEBUG_SIZE to 2MB*CPU_num. This way lustre debug buffer could be just 4MB on a system with 2 CPUs, despite 3GB RAM. It is the reason why often time period in debug logs doesn't scope the reason of failure(sometimes depending on debug level logs it may store just several seconds). When DEBUG_SIZE is not set, debug_mb would be calculated inside libcfs based on RAM and CPU number. Test-Parameters: trivial Signed-off-by: Sergey Cheremencev Change-Id: Iacccc625ec6564c982c75172561c8c3e4114e4b7 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53988 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Alexander Zarochentsev Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/cfg/local.sh b/lustre/tests/cfg/local.sh index 07cf928..bf0a2bc 100644 --- a/lustre/tests/cfg/local.sh +++ b/lustre/tests/cfg/local.sh @@ -99,17 +99,9 @@ DEF_STRIPE_COUNT=${DEF_STRIPE_COUNT:-} # filesystem default stripe count TIMEOUT=${TIMEOUT:-20} PTLDEBUG=${PTLDEBUG:-"vfstrace rpctrace dlmtrace neterror ha config \ ioctl super lfsck"} +DEBUG_SIZE=${DEBUG_SIZE:-} SUBSYSTEM=${SUBSYSTEM:-"all"} -# promise 2MB for every cpu -if [ -f /sys/devices/system/cpu/possible ]; then - _debug_mb=$((($(cut -d "-" -f 2 /sys/devices/system/cpu/possible)+1)*2)) -else - _debug_mb=$(($(getconf _NPROCESSORS_CONF)*2)) -fi - -DEBUG_SIZE=${DEBUG_SIZE:-$_debug_mb} - TSTUSR=${TSTUSR:-"quota_usr"} TSTUSR2=${TSTUSR2:-"quota_2usr"} USER0=${USER0:-"sanityusr"} diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index b4b0830..9e9ea07 100755 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -1885,23 +1885,6 @@ set_osd_param() { do_nodes $nodes "$LCTL set_param -n osd-*.$device.$name=$value" } -set_debug_size () { - local dz=${1:-$DEBUG_SIZE} - - if [ -f /sys/devices/system/cpu/possible ]; then - local cpus=$(($(cut -d "-" -f 2 /sys/devices/system/cpu/possible)+1)) - else - local cpus=$(getconf _NPROCESSORS_CONF 2>/dev/null) - fi - - # bug 19944, adjust size to be -gt num_possible_cpus() - # promise 2MB for every cpu at least - if [ -n "$cpus" ] && [ $((cpus * 2)) -gt $dz ]; then - dz=$((cpus * 2)) - fi - lctl set_param debug_mb=$dz -} - set_default_debug () { local debug=${1:-"$PTLDEBUG"} local subsys=${2:-"$SUBSYSTEM"} @@ -1910,8 +1893,10 @@ set_default_debug () { [ -n "$debug" ] && lctl set_param debug="$debug" >/dev/null [ -n "$subsys" ] && lctl set_param subsystem_debug="${subsys# }" >/dev/null + [ -n "$debug_size" ] && + lctl set_param debug_mb="$debug_size" >/dev/null - [ -n "$debug_size" ] && set_debug_size $debug_size > /dev/null + return 0 } set_default_debug_nodes () {