Skip to content

Commit

Permalink
shimv2: Add missing page size to Hugetlb Stat
Browse files Browse the repository at this point in the history
Fixes: kata-containers#1856

Signed-off-by: Odin Ugedal <[email protected]>
  • Loading branch information
odinuge authored and Eric Ernst committed Jul 17, 2019
1 parent 43f2680 commit 5628825
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions containerd-shim-v2/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ func marshalMetrics(s *service, containerID string) (*google_protobuf.Any, error

func statsToMetrics(cgStats *vc.CgroupStats) *cgroups.Metrics {
var hugetlb []*cgroups.HugetlbStat
for _, v := range cgStats.HugetlbStats {
for pageSize, v := range cgStats.HugetlbStats {
hugetlb = append(
hugetlb,
&cgroups.HugetlbStat{
Usage: v.Usage,
Max: v.MaxUsage,
Failcnt: v.Failcnt,
Usage: v.Usage,
Max: v.MaxUsage,
Failcnt: v.Failcnt,
Pagesize: pageSize,
})
}

Expand Down

0 comments on commit 5628825

Please sign in to comment.