Hay
Date
May 29, 2025, 7:10 a.m.

Environment
x86

running ./charge_reserved_hugetlb.sh -cgroup-v2
-----------------------------------------------
CLEANUP DONE
CLEANUP DONE



Test normal case.
private=, populate=, method=0, reserve=
nr hugepages = 10
writing cgroup limit: 20971520
writing reseravation limit: 20971520

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Not writing to memory.
Using method=0
Shared mapping.
RESERVE mapping.
Allocating using HUGETLBFS.
After write:
hugetlb_usage=0
reserved_usage=10485760
0
10485760
Memory charged to hugtlb=0
Memory charged to reservation=10485760
PASS
CLEANUP DONE



Test normal case with write.
private=, populate=, method=0, reserve=
nr hugepages = 10
writing cgroup limit: 10485760
writing reseravation limit: 10485760

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Using method=0
Shared mapping.
RESERVE mapping.
Allocating using HUGETLBFS.
Writing to memory.
After write:
hugetlb_usage=10485760
reserved_usage=10485760
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE
CLEANUP DONE



Test normal case.
private=, populate=, method=0, reserve=-n
nr hugepages = 10
writing cgroup limit: 20971520
writing reseravation limit: 20971520

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Not writing to memory.
Using method=0
Shared mapping.
NO_RESERVE mapping.
Allocating using HUGETLBFS.
After write:
hugetlb_usage=0
reserved_usage=0
0
0
Memory charged to hugtlb=0
Memory charged to reservation=0
PASS
CLEANUP DONE



Test normal case with write.
private=, populate=, method=0, reserve=-n
nr hugepages = 10
writing cgroup limit: 10485760
writing reseravation limit: 10485760

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Using method=0
Shared mapping.
NO_RESERVE mapping.
Allocating using HUGETLBFS.
Writing to memory.
After write:
hugetlb_usage=10485760
reserved_usage=10485760
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE
CLEANUP DONE



Test normal case.
private=-r, populate=, method=0, reserve=
nr hugepages = 10
writing cgroup limit: 20971520
writing reseravation limit: 20971520

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Not writing to memory.
Using method=0
Private mapping.
RESERVE mapping.
Allocating using HUGETLBFS.
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Not writing to memory.
Using method=0
Private mapping.
RESERVE mapping.
Allocating using HUGETLBFS.
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=0
reserved_usage=10485760
killing write_to_hugetlbfs
Received 2.
0
10485760
Memory charged to hugtlb=0
Memory charged to reservation=10485760
PASS
CLEANUP DONE



Test normal case with write.
private=-r, populate=, method=0, reserve=
nr hugepages = 10
writing cgroup limit: 10485760
writing reseravation limit: 10485760

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Using method=0
Private mapping.
RESERVE mapping.
Allocating using HUGETLBFS.
Writing to memory.
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Using method=0
Private mapping.
RESERVE mapping.
Allocating using HUGETLBFS.
Writing to memory.
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=10485760
reserved_usage=10485760
killing write_to_hugetlbfs
Received 2.
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE
CLEANUP DONE



Test normal case.
private=-r, populate=, method=0, reserve=-n
nr hugepages = 10
writing cgroup limit: 20971520
writing reseravation limit: 20971520

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Not writing to memory.
Using method=0
Private mapping.
NO_RESERVE mapping.
Allocating using HUGETLBFS.
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Not writing to memory.
Using method=0
Private mapping.
NO_RESERVE mapping.
Allocating using HUGETLBFS.
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=0
reserved_usage=0
killing write_to_hugetlbfs
Received 2.
0
0
Memory charged to hugtlb=0
Memory charged to reservation=0
PASS
CLEANUP DONE



Test normal case with write.
private=-r, populate=, method=0, reserve=-n
nr hugepages = 10
writing cgroup limit: 10485760
writing reseravation limit: 10485760

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Using method=0
Private mapping.
NO_RESERVE mapping.
Allocating using HUGETLBFS.
Writing to memory.
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Using method=0
Private mapping.
NO_RESERVE mapping.
Allocating using HUGETLBFS.
Writing to memory.
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=10485760
reserved_usage=10485760
killing write_to_hugetlbfs
Received 2.
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE
CLEANUP DONE



Test normal case.
private=-r, populate=, method=1, reserve=
nr hugepages = 10
writing cgroup limit: 20971520
writing reseravation limit: 20971520

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 1
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Not writing to memory.
Using method=1
Private mapping.
RESERVE mapping.
Allocating using MAP_HUGETLB.
Returned address is 0x7f7c1ca00000
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 1
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Not writing to memory.
Using method=1
Private mapping.
RESERVE mapping.
Allocating using MAP_HUGETLB.
Returned address is 0x7f7c1ca00000
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=0
reserved_usage=10485760
killing write_to_hugetlbfs
Received 2.
0
10485760
Memory charged to hugtlb=0
Memory charged to reservation=10485760
PASS
CLEANUP DONE



Test normal case with write.
private=-r, populate=, method=1, reserve=
nr hugepages = 10
writing cgroup limit: 10485760
writing reseravation limit: 10485760

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 1
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Using method=1
Private mapping.
RESERVE mapping.
Allocating using MAP_HUGETLB.
Returned address is 0x7f30e9e00000
Writing to memory.
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 1
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Using method=1
Private mapping.
RESERVE mapping.
Allocating using MAP_HUGETLB.
Returned address is 0x7f30e9e00000
Writing to memory.
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=10485760
reserved_usage=10485760
killing write_to_hugetlbfs
Received 2.
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE
CLEANUP DONE



Test normal case.
private=-r, populate=, method=1, reserve=-n
nr hugepages = 10
writing cgroup limit: 20971520
writing reseravation limit: 20971520

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 1
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Not writing to memory.
Using method=1
Private mapping.
NO_RESERVE mapping.
Allocating using MAP_HUGETLB.
Returned address is 0x7f8f38000000
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 1
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Not writing to memory.
Using method=1
Private mapping.
NO_RESERVE mapping.
Allocating using MAP_HUGETLB.
Returned address is 0x7f8f38000000
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=0
reserved_usage=0
killing write_to_hugetlbfs
Received 2.
0
0
Memory charged to hugtlb=0
Memory charged to reservation=0
PASS
CLEANUP DONE



Test normal case with write.
private=-r, populate=, method=1, reserve=-n
nr hugepages = 10
writing cgroup limit: 10485760
writing reseravation limit: 10485760

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 1
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Using method=1
Private mapping.
NO_RESERVE mapping.
Allocating using MAP_HUGETLB.
Returned address is 0x7f7ec4600000
Writing to memory.
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 1
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Using method=1
Private mapping.
NO_RESERVE mapping.
Allocating using MAP_HUGETLB.
Returned address is 0x7f7ec4600000
Writing to memory.
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=10485760
reserved_usage=10485760
killing write_to_hugetlbfs
Received 2.
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE
CLEANUP DONE



Test normal case.
private=, populate=, method=2, reserve=
nr hugepages = 10
writing cgroup limit: 20971520
writing reseravation limit: 20971520

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 2
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Not writing to memory.
Using method=2
Shared mapping.
RESERVE mapping.
Allocating using SHM.
shmid: 0x1, shmget key:0
shmaddr: 0x7f03eaa00000
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 2
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Not writing to memory.
Using method=2
Shared mapping.
RESERVE mapping.
Allocating using SHM.
shmid: 0x1, shmget key:0
shmaddr: 0x7f03eaa00000
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=0
reserved_usage=10485760
killing write_to_hugetlbfs
Received 2.
Deleting the memory
Done deleting the memory
0
10485760
Memory charged to hugtlb=0
Memory charged to reservation=10485760
PASS
CLEANUP DONE



Test normal case with write.
private=, populate=, method=2, reserve=
nr hugepages = 10
writing cgroup limit: 10485760
writing reseravation limit: 10485760

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 2
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Using method=2
Shared mapping.
RESERVE mapping.
Allocating using SHM.
shmid: 0x2, shmget key:0
shmaddr: 0x7fec98800000
Writing to memory.
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 2
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Using method=2
Shared mapping.
RESERVE mapping.
Allocating using SHM.
shmid: 0x2, shmget key:0
shmaddr: 0x7fec98800000
Writing to memory.
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=10485760
reserved_usage=10485760
killing write_to_hugetlbfs
Received 2.
Deleting the memory
Done deleting the memory
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE
CLEANUP DONE



Test normal case.
private=-r, populate=, method=2, reserve=
nr hugepages = 10
writing cgroup limit: 20971520
writing reseravation limit: 20971520

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 2
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Not writing to memory.
Using method=2
Private mapping.
RESERVE mapping.
Allocating using SHM.
shmid: 0x3, shmget key:0
shmaddr: 0x7f021c600000
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 2
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Not writing to memory.
Using method=2
Private mapping.
RESERVE mapping.
Allocating using SHM.
shmid: 0x3, shmget key:0
shmaddr: 0x7f021c600000
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=0
reserved_usage=10485760
killing write_to_hugetlbfs
Received 2.
Deleting the memory
Done deleting the memory
0
10485760
Memory charged to hugtlb=0
Memory charged to reservation=10485760
PASS
CLEANUP DONE



Test normal case with write.
private=-r, populate=, method=2, reserve=
nr hugepages = 10
writing cgroup limit: 10485760
writing reseravation limit: 10485760

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 2
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Using method=2
Private mapping.
RESERVE mapping.
Allocating using SHM.
shmid: 0x4, shmget key:0
shmaddr: 0x7fe5b0200000
Writing to memory.
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 2
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Using method=2
Private mapping.
RESERVE mapping.
Allocating using SHM.
shmid: 0x4, shmget key:0
shmaddr: 0x7fe5b0200000
Writing to memory.
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=10485760
reserved_usage=10485760
killing write_to_hugetlbfs
Received 2.
Deleting the memory
Done deleting the memory
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE
CLEANUP DONE



Test normal case.
private=, populate=-o, method=0, reserve=
nr hugepages = 10
writing cgroup limit: 20971520
writing reseravation limit: 20971520

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Not writing to memory.
Using method=0
Shared mapping.
RESERVE mapping.
Allocating using HUGETLBFS.
After write:
hugetlb_usage=10485760
reserved_usage=10485760
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE



Test normal case with write.
private=, populate=-o, method=0, reserve=
nr hugepages = 10
writing cgroup limit: 10485760
writing reseravation limit: 10485760

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Using method=0
Shared mapping.
RESERVE mapping.
Allocating using HUGETLBFS.
Writing to memory.
After write:
hugetlb_usage=10485760
reserved_usage=10485760
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE
CLEANUP DONE



Test normal case.
private=, populate=-o, method=0, reserve=-n
nr hugepages = 10
writing cgroup limit: 20971520
writing reseravation limit: 20971520

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Not writing to memory.
Using method=0
Shared mapping.
NO_RESERVE mapping.
Allocating using HUGETLBFS.
After write:
hugetlb_usage=10485760
reserved_usage=10485760
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE



Test normal case with write.
private=, populate=-o, method=0, reserve=-n
nr hugepages = 10
writing cgroup limit: 10485760
writing reseravation limit: 10485760

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Using method=0
Shared mapping.
NO_RESERVE mapping.
Allocating using HUGETLBFS.
Writing to memory.
After write:
hugetlb_usage=10485760
reserved_usage=10485760
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE
CLEANUP DONE



Test normal case.
private=-r, populate=-o, method=0, reserve=
nr hugepages = 10
writing cgroup limit: 20971520
writing reseravation limit: 20971520

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
Putting task in cgroup 'hugetlb_cgroup_test'
waiting for DONE signal.
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Not writing to memory.
Using method=0
Private mapping.
RESERVE mapping.
Allocating using HUGETLBFS.
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Not writing to memory.
Using method=0
Private mapping.
RESERVE mapping.
Allocating using HUGETLBFS.
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=10485760
reserved_usage=10485760
killing write_to_hugetlbfs
Received 2.
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE



Test normal case with write.
private=-r, populate=-o, method=0, reserve=
nr hugepages = 10
writing cgroup limit: 10485760
writing reseravation limit: 10485760

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Using method=0
Private mapping.
RESERVE mapping.
Allocating using HUGETLBFS.
Writing to memory.
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Using method=0
Private mapping.
RESERVE mapping.
Allocating using HUGETLBFS.
Writing to memory.
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=10485760
reserved_usage=10485760
killing write_to_hugetlbfs
Received 2.
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE
CLEANUP DONE



Test normal case.
private=-r, populate=-o, method=0, reserve=-n
nr hugepages = 10
writing cgroup limit: 20971520
writing reseravation limit: 20971520

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Not writing to memory.
Using method=0
Private mapping.
NO_RESERVE mapping.
Allocating using HUGETLBFS.
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Not writing to memory.
Using method=0
Private mapping.
NO_RESERVE mapping.
Allocating using HUGETLBFS.
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=10485760
reserved_usage=10485760
killing write_to_hugetlbfs
Received 2.
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE



Test normal case with write.
private=-r, populate=-o, method=0, reserve=-n
nr hugepages = 10
writing cgroup limit: 10485760
writing reseravation limit: 10485760

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Using method=0
Private mapping.
NO_RESERVE mapping.
Allocating using HUGETLBFS.
Writing to memory.
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Using method=0
Private mapping.
NO_RESERVE mapping.
Allocating using HUGETLBFS.
Writing to memory.
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=10485760
reserved_usage=10485760
killing write_to_hugetlbfs
Received 2.
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE
CLEANUP DONE



Test normal case.
private=-r, populate=-o, method=1, reserve=
nr hugepages = 10
writing cgroup limit: 20971520
writing reseravation limit: 20971520

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 1
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Not writing to memory.
Using method=1
Private mapping.
RESERVE mapping.
Allocating using MAP_HUGETLB.
Returned address is 0x7fe2c5400000
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 1
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Not writing to memory.
Using method=1
Private mapping.
RESERVE mapping.
Allocating using MAP_HUGETLB.
Returned address is 0x7fe2c5400000
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=10485760
reserved_usage=10485760
killing write_to_hugetlbfs
Received 2.
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE



Test normal case with write.
private=-r, populate=-o, method=1, reserve=
nr hugepages = 10
writing cgroup limit: 10485760
writing reseravation limit: 10485760

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 1
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Using method=1
Private mapping.
RESERVE mapping.
Allocating using MAP_HUGETLB.
Returned address is 0x7f6d1c600000
Writing to memory.
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 1
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Using method=1
Private mapping.
RESERVE mapping.
Allocating using MAP_HUGETLB.
Returned address is 0x7f6d1c600000
Writing to memory.
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=10485760
reserved_usage=10485760
killing write_to_hugetlbfs
Received 2.
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE
CLEANUP DONE



Test normal case.
private=-r, populate=-o, method=1, reserve=-n
nr hugepages = 10
writing cgroup limit: 20971520
writing reseravation limit: 20971520

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 1
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Not writing to memory.
Using method=1
Private mapping.
NO_RESERVE mapping.
Allocating using MAP_HUGETLB.
Returned address is 0x7fef06a00000
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 1
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Not writing to memory.
Using method=1
Private mapping.
NO_RESERVE mapping.
Allocating using MAP_HUGETLB.
Returned address is 0x7fef06a00000
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=10485760
reserved_usage=10485760
killing write_to_hugetlbfs
Received 2.
10485760
10485760
Memory charged to hugtlb=10485760[  882.289235] <LAVA_SIGNAL_ENDTC mm_run_vmtests_sh_thuge-gen>

Memory charged to reservation=10485760
PASS
CLEANUP DONE



Test normal case with write.
mm_run_vmtests_sh_thuge-gen fail


ough huge pages, need 4
Bail out! No GB pages available on x86-64
Please boot with hugepagesz=1G hugepages=4
# Totals: pass:0 fail:0 xfail:0 xpass:0 skip:0 error:0
[FAIL]
exit=1-----------------------------------------------
running ./charge_reserved_hugetlb.sh -cgroup-v2
-----------------------------------------------
CLEANUP DONE
CLEANUP DONE



Test normal case.
private=, populate=, method=0, reserve=
nr hugepages = 10
writing cgroup limit: 20971520
writing reseravation limit: 20971520

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Not writing to memory.
Using method=0
Shared mapping.
RESERVE mapping.
Allocating using HUGETLBFS.
After write:
hugetlb_usage=0
reserved_usage=10485760
0
10485760
Memory charged to hugtlb=0
Memory charged to reservation=10485760
PASS
CLEANUP DONE



Test normal case with write.
private=, populate=, method=0, reserve=
nr hugepages = 10
writing cgroup limit: 10485760
writing reseravation limit: 10485760

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Using method=0
Shared mapping.
RESERVE mapping.
Allocating using HUGETLBFS.
Writing to memory.
After write:
hugetlb_usage=10485760
reserved_usage=10485760
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE
CLEANUP DONE



Test normal case.
private=, populate=, method=0, reserve=-n
nr hugepages = 10
writing cgroup limit: 20971520
writing reseravation limit: 20971520

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Not writing to memory.
Using method=0
Shared mapping.
NO_RESERVE mapping.
Allocating using HUGETLBFS.
After write:
hugetlb_usage=0
reserved_usage=0
0
0
Memory charged to hugtlb=0
Memory charged to reservation=0
PASS
CLEANUP DONE



Test normal case with write.
private=, populate=, method=0, reserve=-n
nr hugepages = 10
writing cgroup limit: 10485760
writing reseravation limit: 10485760

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Using method=0
Shared mapping.
NO_RESERVE mapping.
Allocating using HUGETLBFS.
Writing to memory.
After write:
hugetlb_usage=10485760
reserved_usage=10485760
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE
CLEANUP DONE



Test normal case.
private=-r, populate=, method=0, reserve=
nr hugepages = 10
writing cgroup limit: 20971520
writing reseravation limit: 20971520

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Not writing to memory.
Using method=0
Private mapping.
RESERVE mapping.
Allocating using HUGETLBFS.
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Not writing to memory.
Using method=0
Private mapping.
RESERVE mapping.
Allocating using HUGETLBFS.
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=0
reserved_usage=10485760
killing write_to_hugetlbfs
Received 2.
0
10485760
Memory charged to hugtlb=0
Memory charged to reservation=10485760
PASS
CLEANUP DONE



Test normal case with write.
private=-r, populate=, method=0, reserve=
nr hugepages = 10
writing cgroup limit: 10485760
writing reseravation limit: 10485760

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Using method=0
Private mapping.
RESERVE mapping.
Allocating using HUGETLBFS.
Writing to memory.
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Using method=0
Private mapping.
RESERVE mapping.
Allocating using HUGETLBFS.
Writing to memory.
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=10485760
reserved_usage=10485760
killing write_to_hugetlbfs
Received 2.
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE
CLEANUP DONE



Test normal case.
private=-r, populate=, method=0, reserve=-n
nr hugepages = 10
writing cgroup limit: 20971520
writing reseravation limit: 20971520

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Not writing to memory.
Using method=0
Private mapping.
NO_RESERVE mapping.
Allocating using HUGETLBFS.
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Not writing to memory.
Using method=0
Private mapping.
NO_RESERVE mapping.
Allocating using HUGETLBFS.
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=0
reserved_usage=0
killing write_to_hugetlbfs
Received 2.
0
0
Memory charged to hugtlb=0
Memory charged to reservation=0
PASS
CLEANUP DONE



Test normal case with write.
private=-r, populate=, method=0, reserve=-n
nr hugepages = 10
writing cgroup limit: 10485760
writing reseravation limit: 10485760

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Using method=0
Private mapping.
NO_RESERVE mapping.
Allocating using HUGETLBFS.
Writing to memory.
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Using method=0
Private mapping.
NO_RESERVE mapping.
Allocating using HUGETLBFS.
Writing to memory.
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=10485760
reserved_usage=10485760
killing write_to_hugetlbfs
Received 2.
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE
CLEANUP DONE



Test normal case.
private=-r, populate=, method=1, reserve=
nr hugepages = 10
writing cgroup limit: 20971520
writing reseravation limit: 20971520

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 1
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Not writing to memory.
Using method=1
Private mapping.
RESERVE mapping.
Allocating using MAP_HUGETLB.
Returned address is 0x7fee6e800000
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 1
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Not writing to memory.
Using method=1
Private mapping.
RESERVE mapping.
Allocating using MAP_HUGETLB.
Returned address is 0x7fee6e800000
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=0
reserved_usage=10485760
killing write_to_hugetlbfs
Received 2.
0
10485760
Memory charged to hugtlb=0
Memory charged to reservation=10485760
PASS
CLEANUP DONE



Test normal case with write.
private=-r, populate=, method=1, reserve=
nr hugepages = 10
writing cgroup limit: 10485760
writing reseravation limit: 10485760

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 1
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Using method=1
Private mapping.
RESERVE mapping.
Allocating using MAP_HUGETLB.
Returned address is 0x7fa738000000
Writing to memory.
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 1
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Using method=1
Private mapping.
RESERVE mapping.
Allocating using MAP_HUGETLB.
Returned address is 0x7fa738000000
Writing to memory.
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=10485760
reserved_usage=10485760
killing write_to_hugetlbfs
Received 2.
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE
CLEANUP DONE



Test normal case.
private=-r, populate=, method=1, reserve=-n
nr hugepages = 10
writing cgroup limit: 20971520
writing reseravation limit: 20971520

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 1
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Not writing to memory.
Using method=1
Private mapping.
NO_RESERVE mapping.
Allocating using MAP_HUGETLB.
Returned address is 0x7ff072000000
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 1
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Not writing to memory.
Using method=1
Private mapping.
NO_RESERVE mapping.
Allocating using MAP_HUGETLB.
Returned address is 0x7ff072000000
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=0
reserved_usage=0
killing write_to_hugetlbfs
Received 2.
0
0
Memory charged to hugtlb=0
Memory charged to reservation=0
PASS
CLEANUP DONE



Test normal case with write.
private=-r, populate=, method=1, reserve=-n
nr hugepages = 10
writing cgroup limit: 10485760
writing reseravation limit: 10485760

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 1
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Using method=1
Private mapping.
NO_RESERVE mapping.
Allocating using MAP_HUGETLB.
Returned address is 0x7f2369000000
Writing to memory.
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 1
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Using method=1
Private mapping.
NO_RESERVE mapping.
Allocating using MAP_HUGETLB.
Returned address is 0x7f2369000000
Writing to memory.
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=10485760
reserved_usage=10485760
killing write_to_hugetlbfs
Received 2.
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE
CLEANUP DONE



Test normal case.
private=, populate=, method=2, reserve=
nr hugepages = 10
writing cgroup limit: 20971520
writing reseravation limit: 20971520

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 2
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Not writing to memory.
Using method=2
Shared mapping.
RESERVE mapping.
Allocating using SHM.
shmid: 0x1, shmget key:0
shmaddr: 0x7f84c7200000
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 2
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Not writing to memory.
Using method=2
Shared mapping.
RESERVE mapping.
Allocating using SHM.
shmid: 0x1, shmget key:0
shmaddr: 0x7f84c7200000
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=0
reserved_usage=10485760
killing write_to_hugetlbfs
Received 2.
Deleting the memory
Done deleting the memory
0
10485760
Memory charged to hugtlb=0
Memory charged to reservation=10485760
PASS
CLEANUP DONE



Test normal case with write.
private=, populate=, method=2, reserve=
nr hugepages = 10
writing cgroup limit: 10485760
writing reseravation limit: 10485760

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 2
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Using method=2
Shared mapping.
RESERVE mapping.
Allocating using SHM.
shmid: 0x2, shmget key:0
shmaddr: 0x7f9012200000
Writing to memory.
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 2
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Using method=2
Shared mapping.
RESERVE mapping.
Allocating using SHM.
shmid: 0x2, shmget key:0
shmaddr: 0x7f9012200000
Writing to memory.
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=10485760
reserved_usage=10485760
killing write_to_hugetlbfs
Received 2.
Deleting the memory
Done deleting the memory
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE
CLEANUP DONE



Test normal case.
private=-r, populate=, method=2, reserve=
nr hugepages = 10
writing cgroup limit: 20971520
writing reseravation limit: 20971520

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 2
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Not writing to memory.
Using method=2
Private mapping.
RESERVE mapping.
Allocating using SHM.
shmid: 0x3, shmget key:0
shmaddr: 0x7feb98400000
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 2
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Not writing to memory.
Using method=2
Private mapping.
RESERVE mapping.
Allocating using SHM.
shmid: 0x3, shmget key:0
shmaddr: 0x7feb98400000
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=0
reserved_usage=10485760
killing write_to_hugetlbfs
Received 2.
Deleting the memory
Done deleting the memory
0
10485760
Memory charged to hugtlb=0
Memory charged to reservation=10485760
PASS
CLEANUP DONE



Test normal case with write.
private=-r, populate=, method=2, reserve=
nr hugepages = 10
writing cgroup limit: 10485760
writing reseravation limit: 10485760

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 2
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Using method=2
Private mapping.
RESERVE mapping.
Allocating using SHM.
shmid: 0x4, shmget key:0
shmaddr: 0x7f2a0dc00000
Writing to memory.
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 2
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Not populating.
Using method=2
Private mapping.
RESERVE mapping.
Allocating using SHM.
shmid: 0x4, shmget key:0
shmaddr: 0x7f2a0dc00000
Writing to memory.
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=10485760
reserved_usage=10485760
killing write_to_hugetlbfs
Received 2.
Deleting the memory
Done deleting the memory
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE
CLEANUP DONE



Test normal case.
private=, populate=-o, method=0, reserve=
nr hugepages = 10
writing cgroup limit: 20971520
writing reseravation limit: 20971520

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Not writing to memory.
Using method=0
Shared mapping.
RESERVE mapping.
Allocating using HUGETLBFS.
After write:
hugetlb_usage=10485760
reserved_usage=10485760
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE



Test normal case with write.
private=, populate=-o, method=0, reserve=
nr hugepages = 10
writing cgroup limit: 10485760
writing reseravation limit: 10485760

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Using method=0
Shared mapping.
RESERVE mapping.
Allocating using HUGETLBFS.
Writing to memory.
After write:
hugetlb_usage=10485760
reserved_usage=10485760
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE
CLEANUP DONE



Test normal case.
private=, populate=-o, method=0, reserve=-n
nr hugepages = 10
writing cgroup limit: 20971520
writing reseravation limit: 20971520

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Not writing to memory.
Using method=0
Shared mapping.
NO_RESERVE mapping.
Allocating using HUGETLBFS.
After write:
hugetlb_usage=10485760
reserved_usage=10485760
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE



Test normal case with write.
private=, populate=-o, method=0, reserve=-n
nr hugepages = 10
writing cgroup limit: 10485760
writing reseravation limit: 10485760

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Using method=0
Shared mapping.
NO_RESERVE mapping.
Allocating using HUGETLBFS.
Writing to memory.
After write:
hugetlb_usage=10485760
reserved_usage=10485760
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE
CLEANUP DONE



Test normal case.
private=-r, populate=-o, method=0, reserve=
nr hugepages = 10
writing cgroup limit: 20971520
writing reseravation limit: 20971520

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Not writing to memory.
Using method=0
Private mapping.
RESERVE mapping.
Allocating using HUGETLBFS.
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Not writing to memory.
Using method=0
Private mapping.
RESERVE mapping.
Allocating using HUGETLBFS.
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=10485760
reserved_usage=10485760
killing write_to_hugetlbfs
Received 2.
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE



Test normal case with write.
private=-r, populate=-o, method=0, reserve=
nr hugepages = 10
writing cgroup limit: 10485760
writing reseravation limit: 10485760

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Using method=0
Private mapping.
RESERVE mapping.
Allocating using HUGETLBFS.
Writing to memory.
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Using method=0
Private mapping.
RESERVE mapping.
Allocating using HUGETLBFS.
Writing to memory.
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=10485760
reserved_usage=10485760
killing write_to_hugetlbfs
Received 2.
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE
CLEANUP DONE



Test normal case.
private=-r, populate=-o, method=0, reserve=-n
nr hugepages = 10
writing cgroup limit: 20971520
writing reseravation limit: 20971520

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Not writing to memory.
Using method=0
Private mapping.
NO_RESERVE mapping.
Allocating using HUGETLBFS.
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Not writing to memory.
Using method=0
Private mapping.
NO_RESERVE mapping.
Allocating using HUGETLBFS.
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=10485760
reserved_usage=10485760
killing write_to_hugetlbfs
Received 2.
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE



Test normal case with write.
private=-r, populate=-o, method=0, reserve=-n
nr hugepages = 10
writing cgroup limit: 10485760
writing reseravation limit: 10485760

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Using method=0
Private mapping.
NO_RESERVE mapping.
Allocating using HUGETLBFS.
Writing to memory.
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 0
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Using method=0
Private mapping.
NO_RESERVE mapping.
Allocating using HUGETLBFS.
Writing to memory.
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=10485760
reserved_usage=10485760
killing write_to_hugetlbfs
Received 2.
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE
CLEANUP DONE



Test normal case.
private=-r, populate=-o, method=1, reserve=
nr hugepages = 10
writing cgroup limit: 20971520
writing reseravation limit: 20971520

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 1
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Not writing to memory.
Using method=1
Private mapping.
RESERVE mapping.
Allocating using MAP_HUGETLB.
Returned address is 0x7fd1a6200000
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 1
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Not writing to memory.
Using method=1
Private mapping.
RESERVE mapping.
Allocating using MAP_HUGETLB.
Returned address is 0x7fd1a6200000
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=10485760
reserved_usage=10485760
killing write_to_hugetlbfs
Received 2.
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE



Test normal case with write.
private=-r, populate=-o, method=1, reserve=
nr hugepages = 10
writing cgroup limit: 10485760
writing reseravation limit: 10485760

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 1
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Using method=1
Private mapping.
RESERVE mapping.
Allocating using MAP_HUGETLB.
Returned address is 0x7fc6e9a00000
Writing to memory.
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 1
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Using method=1
Private mapping.
RESERVE mapping.
Allocating using MAP_HUGETLB.
Returned address is 0x7fc6e9a00000
Writing to memory.
DONE
================= end output.
write_result is 0
After write:
hugetlb_usage=10485760
reserved_usage=10485760
killing write_to_hugetlbfs
Received 2.
10485760
10485760
Memory charged to hugtlb=10485760
Memory charged to reservation=10485760
PASS
CLEANUP DONE
CLEANUP DONE



Test normal case.
private=-r, populate=-o, method=1, reserve=-n
nr hugepages = 10
writing cgroup limit: 20971520
writing reseravation limit: 20971520

Starting:
hugetlb_usage=0
reserved_usage=0
expect_failure is 0
waiting for DONE signal.
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 1
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Not writing to memory.
Using method=1
Private mapping.
NO_RESERVE mapping.
Allocating using MAP_HUGETLB.
Returned address is 0x7f9ba4c00000
DONE
================= write_hugetlb_memory.sh output is:
Putting task in cgroup 'hugetlb_cgroup_test'
Method is 1
Writing to this path: /mnt/huge/test
Writing this size: 10485760
Populating.
Not writing to memory.
Using method=1
Private mapping.
NO_RESERVE mapping.
Allocating using MAP_HUGETLB.
Returned address is 0x7f9ba4c00000
DONE
================= end output.
[  232.748251] <LAVA_SIGNAL_ENDTC mm_run_vmtests_sh_thuge-gen>
write_result is 0
After write:
hugetlb_usage=10485760
mm_run_vmtests_sh_thuge-gen fail