Lines Matching +full:1 +full:mb

19 if [[ "$1" == "-cgroup-v2" ]]; then
20 cgroup2=1
28 cgroup_path=$(mount -t cgroup2 | head -1 | awk -e '{print $3}')
32 do_umount=1
40 do_umount=1
71 local expected="$1"
78 exit 1
85 mb=$(($kb / 1024))
86 echo $mb
89 MB=$(get_machine_hugepage_size)
92 local name="$1"
99 echo "$cgroup_limit" >$cgroup_path/$name/hugetlb.${MB}MB.$fault_limit_file
103 $cgroup_path/$name/hugetlb.${MB}MB.$reservation_limit_file
114 local cgroup="$1"
115 local path="$cgroup_path/$cgroup/hugetlb.${MB}MB.$reservation_usage_file"
125 local cgroup="$1"
128 local path="$cgroup_path/$cgroup/hugetlb.${MB}MB.$reservation_usage_file"
138 local cgroup="$1"
141 local path="$cgroup_path/$cgroup/hugetlb.${MB}MB.$fault_usage_file"
151 local cgroup="$1"
167 local hugetlb_usage=$cgroup_path/$cgroup/hugetlb.${MB}MB.$fault_usage_file
168 local reserved_usage=$cgroup_path/$cgroup/hugetlb.${MB}MB.$reservation_usage_file
181 if [[ "$method" == "1" ]] || [[ "$method" == 2 ]] ||
182 [[ "$private" == "-r" ]] && [[ "$expect_failure" != 1 ]]; then
185 "$cgroup" "$path" "$method" "$private" "-l" "$reserve" 2>&1 | tee $output &
196 exit 1
227 if [[ "$write_result" == 1 ]]; then
228 reservation_failed=1
236 oom_killed=1
252 local cgroup="$1"
268 local size=$(($1 * ${MB} * 1024 * 1024))
271 local cgroup_limit=$(($4 * ${MB} * 1024 * 1024))
272 local reservation_limit=$(($5 * ${MB} * 1024 * 1024))
291 mount -t hugetlbfs -o pagesize=${MB}M,size=256M none /mnt/huge
299 local final_hugetlb=$(cat $cgroup_path/hugetlb_cgroup_test/hugetlb.${MB}MB.$fault_usage_file)
300 …local final_reservation=$(cat $cgroup_path/hugetlb_cgroup_test/hugetlb.${MB}MB.$reservation_usage_…
309 local size1="$1"
345 mount -t hugetlbfs -o pagesize=${MB}M,size=256M none /mnt/huge
356 local cgroup1_hugetlb_usage=$cgroup_path/hugetlb_cgroup_test1/hugetlb.${MB}MB.$fault_usage_file
357 …local cgroup1_reservation_usage=$cgroup_path/hugetlb_cgroup_test1/hugetlb.${MB}MB.$reservation_usa…
358 local cgroup2_hugetlb_usage=$cgroup_path/hugetlb_cgroup_test2/hugetlb.${MB}MB.$fault_usage_file
359 …local cgroup2_reservation_usage=$cgroup_path/hugetlb_cgroup_test2/hugetlb.${MB}MB.$reservation_usa…
400 for method in 0 1 2; do
405 if [[ "$method" == 1 ]] && [[ "$private" == "" ]]; then
430 expect_equal "$((5 * $MB * 1024 * 1024))" "$hugetlb_difference" \
438 expect_equal "$((5 * $MB * 1024 * 1024))" "$reserved_difference" \
458 expect_equal "$((5 * $MB * 1024 * 1024))" "$hugetlb_difference" \
461 expect_equal "$((5 * $MB * 1024 * 1024))" "$reserved_difference" \
475 run_test "5" "$populate" '' "10" "2" "10" "$method" "$private" "1" \
478 expect_equal "1" "$reservation_failed" "Reservation succeeded."
493 run_test 5 "$populate" "-w" 2 10 10 "$method" "$private" "1" "$reserve"
495 expect_equal "1" "$oom_killed" "Not oom killed."
517 "Incorrect reservations charged to cgroup 1."
524 "Incorrect reservations charged to cgroup 1."
532 "Incorrect hugetlb charged to cgroup 1."
539 "Incorrect hugetlb charged to cgroup 1."
562 "Incorrect hugetlb charged to cgroup 1."
565 "Incorrect reservation charged to cgroup 1."