One kvm virtual machine (8 vcpus+8G memory) of Ubuntu 22.04 with cgroup2 system,
cat /sys/fs/cgroup/cgroup.subtree_control
hugetlb controller included;
But another kvm vm (4 vcpus+4G memory) of Ubuntu 22.04 with cgroup2 system,
cat /sys/fs/cgroup/cgroup.subtree_control
no hugetlb controller included.
You have to manually
echo +hugetlb > cgroup.subtree_control, which is not as expected.
In linux kernel source code / systemd source code, I did not find the relevant processing of automatically enabling hugetlb or automatically disabling hugetlb.
Would you be kind to tell me where the code to automatically enable hugetlb lies?
One kvm virtual machine (8 vcpus+8G memory) of Ubuntu 22.04 with cgroup2 system, cat /sys/fs/cgroup/cgroup.subtree_control hugetlb controller included; But another kvm vm (4 vcpus+4G memory) of Ubuntu 22.04 with cgroup2 system, cat /sys/fs/cgroup/cgroup.subtree_control no hugetlb controller included. You have to manually echo +hugetlb > cgroup.subtree_control, which is not as expected.
In linux kernel source code / systemd source code, I did not find the relevant processing of automatically enabling hugetlb or automatically disabling hugetlb. Would you be kind to tell me where the code to automatically enable hugetlb lies?