Skip to content

Commit

Permalink
Merge pull request #698 from lubinszARM/pr_pressue_mac
Browse files Browse the repository at this point in the history
unsupportedManager: adding GetMemoryPressure
  • Loading branch information
xu282934741 authored Sep 12, 2024
2 parents f975841 + 6cecc9e commit d1dc9d9
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/util/cgroup/manager/v1/fs_unsupported.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ func (m *unsupportedManager) GetNumaMemory(absCgroupPath string) (map[int]*commo
return nil, fmt.Errorf("unsupported manager v1")
}

func (m *unsupportedManager) GetMemoryPressure(absCgroupPath string, t common.PressureType) (*common.MemoryPressure, error) {
return nil, fmt.Errorf("unsupported manager v1")
}

func (m *unsupportedManager) GetCPU(_ string) (*common.CPUStats, error) {
return nil, fmt.Errorf("unsupported manager v1")
}
Expand Down
4 changes: 4 additions & 0 deletions pkg/util/cgroup/manager/v2/fs_unsupported.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ func (m *unsupportedManager) GetNumaMemory(absCgroupPath string) (map[int]*commo
return nil, fmt.Errorf("unsupported manager v2")
}

func (m *unsupportedManager) GetMemoryPressure(absCgroupPath string, t common.PressureType) (*common.MemoryPressure, error) {
return nil, fmt.Errorf("unsupported manager v2")
}

func (m *unsupportedManager) GetCPU(_ string) (*common.CPUStats, error) {
return nil, fmt.Errorf("unsupported manager v2")
}
Expand Down
24 changes: 24 additions & 0 deletions pkg/util/machine/zone_unsupported.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//go:build !linux && !windows
// +build !linux,!windows

/*
Copyright 2022 The Katalyst Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package machine

func GetNormalZoneInfo(zoneInfoPath string) []NormalZoneInfo {
return nil
}

0 comments on commit d1dc9d9

Please sign in to comment.