Bug 177811

Summary: vm.nr_hugepages not allocating memory after setting to 0
Product: Other Reporter: andrei.grg
Component: OtherAssignee: other_other
Status: NEW ---    
Severity: normal    
Priority: P1    
Hardware: x86-64   
OS: Linux   
Kernel Version: 4.7.6 Subsystem:
Regression: No Bisected commit-id:

Description andrei.grg 2016-10-17 09:47:04 UTC
Steps to reproduce:

- Use 1GB pagefiles.
- echo 9 > /proc/sys/vm/nr_hugepages
- check that the 9GB memory is now reserved, and it should.
- echo 0 > /proc/sys/vm/nr_hugepages
- check that the 9GB reservation has beed freed, and it should.
- echo 9 > /proc/sys/vm/nr_hugepages
- check that the 9GB memory is reserved, and it's not. (or it reserves less.)

More info: Performing these steps the memory reserved was less and less as 9GB until no reservation was made anymore at all. It can also be the case that after the free-up it allocates only around 1GB and then it stops.