Update module github.com/opencontainers/cgroups to v0.0.4

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
renovate[bot]
2025-07-14 23:46:15 +00:00
committed by GitHub
parent 6b9a3066b6
commit df7d787b4c
5 changed files with 31 additions and 14 deletions

View File

@@ -43,10 +43,11 @@ func setHugeTlb(dirPath string, r *cgroups.Resources) error {
func statHugeTlb(dirPath string, stats *cgroups.Stats) error {
hugetlbStats := cgroups.HugetlbStats{}
rsvd := ".rsvd"
for _, pagesize := range cgroups.HugePageSizes() {
prefix := "hugetlb." + pagesize
again:
prefix := "hugetlb." + pagesize + rsvd
value, err := fscommon.GetCgroupParamUint(dirPath, prefix+".current")
value, err := fscommon.GetCgroupParamUint(dirPath, prefix+rsvd+".current")
if err != nil {
if rsvd != "" && errors.Is(err, os.ErrNotExist) {
rsvd = ""