24 lines · bash
1#!/bin/bash2# SPDX-License-Identifier: GPL-2.03 4set -e5 6size=$17populate=$28write=$39cgroup=$410path=$511method=$612private=$713want_sleep=$814reserve=$915 16echo "Putting task in cgroup '$cgroup'"17echo $$ > ${cgroup_path:-/dev/cgroup/memory}/"$cgroup"/cgroup.procs18 19echo "Method is $method"20 21set +e22./write_to_hugetlbfs -p "$path" -s "$size" "$write" "$populate" -m "$method" \23 "$private" "$want_sleep" "$reserve"24