I have recently configured my system to allocate 3 GB of my RAM to huge pages using kernel boot parameters. What I did was add the following kernel boot parameters to GRUB:
default_hugepagesz=2M hugepagesz=1G hugepages=3
However, I have since decided that I don't need them anymore, and have tried to disable them. I removed these parameters from GRUB and ran update-grub. However, when I rebooted my system, my RAM was still taken up by the 3 GB I allocated to huge pages. When I check the file /proc/meminfo/, I see the following lines:
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
Hugetlb: 3145728 kB
I believe these lines indicate that 3 GB of my system's memory is still allocated to Hugetlb, even after removing the kernel parameters. I also have not configured /etc/systctl.conf/ at all to use huge pages, and when I run the sysctl -a command, these lines are included in the output:
vm.nr_hugepages = 0
vm.nr_hugepages_mempolicy = 0
vm.nr_overcommit_hugepages = 0
...which indicate that no memory should have been allocated to huge pages. Lastly, the file /proc/sys/vm/nr_hugepages also reads 0, which again shows that there shouldn't be any huge pages.
So, my question is, how do I disable huge pages?