Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Commit

Permalink
Power optimisation library - C-States functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
KingKoopasGoomba committed Jun 28, 2022
1 parent 5756775 commit bd80251
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 0 additions & 3 deletions pkg/power/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,6 @@ func (pool *poolImpl) removeCoreByID(coreId int) (Core, error) {
if index < 0 {
return nil, errors.Errorf("core id %d not found in pool %s", coreId, pool.Name)
}
if coreObj.getReserved() {
return coreObj, errors.Errorf("Core %d is system reserved and cannot be moved", coreId)
}
return coreObj, pool.doRemoveCore(index)
}

Expand Down
5 changes: 4 additions & 1 deletion pkg/power/power.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ var supportedFeatureErrors = map[int]error{
// returns node object with empty list of exclusive pools, and a default pool containing all cpus
// by default all cpus are set to system reserved
func CreateInstance(nodeName string) (Node, error) {
// TODO this will need to change in manager
var allErrors *multierror.Error
checks := preChecks()
// if more or equal errors than supported features has occurred
Expand Down Expand Up @@ -113,3 +112,7 @@ func IsFeatureSupported(features ...int) bool {
}
return true
}

func FeatureSupportError(feature int) error {
return supportedFeatureErrors[feature]
}

0 comments on commit bd80251

Please sign in to comment.