bc29036e1d
Running charge_reserved_hugetlb.sh generates errors if sh is set to dash: ./charge_reserved_hugetlb.sh: 9: [[: not found ./charge_reserved_hugetlb.sh: 19: [[: not found ./charge_reserved_hugetlb.sh: 27: [[: not found ./charge_reserved_hugetlb.sh: 37: [[: not found ./charge_reserved_hugetlb.sh: 45: Syntax error: "(" unexpected Switch to using /bin/bash instead of /bin/sh. Make the switch for write_hugetlb_memory.sh as well which is called from charge_reserved_hugetlb.sh. Link: https://lkml.kernel.org/r/20240116090455.3407378-1-usama.anjum@collabora.com Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Cc: Muhammad Usama Anjum <usama.anjum@collabora.com> Cc: Shuah Khan <shuah@kernel.org> Cc: David Laight <David.Laight@ACULAB.COM> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
24 lines
413 B
Bash
Executable File
24 lines
413 B
Bash
Executable File
#!/bin/bash
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
set -e
|
|
|
|
size=$1
|
|
populate=$2
|
|
write=$3
|
|
cgroup=$4
|
|
path=$5
|
|
method=$6
|
|
private=$7
|
|
want_sleep=$8
|
|
reserve=$9
|
|
|
|
echo "Putting task in cgroup '$cgroup'"
|
|
echo $$ > ${cgroup_path:-/dev/cgroup/memory}/"$cgroup"/cgroup.procs
|
|
|
|
echo "Method is $method"
|
|
|
|
set +e
|
|
./write_to_hugetlbfs -p "$path" -s "$size" "$write" "$populate" -m "$method" \
|
|
"$private" "$want_sleep" "$reserve"
|