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 <lizhun@kylinos.cn>
  • Loading branch information
kylinlizhun committed Aug 8, 2023
1 parent e0f10a8 commit a4ad3d4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/utils/memory_resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ func GetNumaMemoryResources() (NumaMemoryResources, error) {
// Get hugepages
hugepageBytes, err := getHugepagesBytes(filepath.Join(sysBusNodeBasepath, numaNode, "hugepages"))
if err != nil {
return nil, err
if os.IsNotExist(err) {
continue
} else {
return nil, err
}
}
for n, s := range hugepageBytes {
info[n] = s
Expand Down

0 comments on commit a4ad3d4

Please sign in to comment.