Skip to content

Commit

Permalink
fix empty hugepages in some numa nodes caused no such file or directo…
Browse files Browse the repository at this point in the history
…ry error

Signed-off-by: lizhun <[email protected]>
  • Loading branch information
freelizhun authored and kylinlizhun committed Aug 7, 2023
1 parent e0f10a8 commit 1547eac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/utils/memory_resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ func GetNumaMemoryResources() (NumaMemoryResources, error) {
info[corev1.ResourceMemory] = nodeTotalMemory

// Get hugepages
_, err = os.Stat(filepath.Join(sysBusNodeBasepath, numaNode, "hugepages"))
if err != nil && os.IsNotExist(err) {
continue
}
hugepageBytes, err := getHugepagesBytes(filepath.Join(sysBusNodeBasepath, numaNode, "hugepages"))
if err != nil {
return nil, err
Expand Down

0 comments on commit 1547eac

Please sign in to comment.