-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add thermal control support for SONiC #3949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 25 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
cf98224
Add make support for thermal control feature
Junchao-Mellanox f428c1c
[sonic_platform]fix issues found in thermal ctrl:
2b4089d
[sonic_platform]fix issues found in thermal ctrl:
25a3aef
[sonic_platform]add get_name for fan and psu
325840c
[sonic_platform]fix divide-by-zero error due to max speed for psu fan…
952393f
[thermal.py]handle get_high_critical_threshold
1d83717
Move task_base form sonic-platform-daemon to sonic-daemon-base so tha…
Junchao-Mellanox 77a1d4b
Merge branch 'thermal-control' of https://github.com/Junchao-Mellanox…
Junchao-Mellanox ff562c9
Merge from stephen to fix thermal related issues
Junchao-Mellanox 6f1e2c3
[fan.py]fix error in get_target_speed for PSU fan
fa8273b
Add thermal policy JSON file for mellanox devices
Junchao-Mellanox aeee985
Fix issue found by manual test
Junchao-Mellanox d27f67b
add default thermal control implementation to mellanox platform api a…
Junchao-Mellanox 5773bb2
add unit test support for sonic thermalctld
Junchao-Mellanox 9772e30
rename some functions to make it more readable according to Kebo comm…
Junchao-Mellanox d4de5d8
add check for speed value in thermal actions to avoid load invalid value
Junchao-Mellanox 183a42b
add unit test to cover thermal conditions and actions
Junchao-Mellanox 27803f3
Change according to stepan comment
Junchao-Mellanox af996c7
1. Add base class for FanConditions and PsuConditions; 2. Add default…
Junchao-Mellanox 704228c
remove thermalctld from critical_processes
Junchao-Mellanox 3d9bf8a
add default thermal manager getter in chassis.py
Junchao-Mellanox e479f4e
add implementation for start and stop thermal algorithm
Junchao-Mellanox c865626
add unit test for thermal algorithm related JSON config
Junchao-Mellanox dcc232e
adjust thermal_policy.json to make it compatible with current platfor…
Junchao-Mellanox bef6699
Change PSU FAN naming rule
Junchao-Mellanox 7521051
Merge branch 'master' into thermal-policy
Junchao-Mellanox fbee0b0
Add SONIC_CONFIG_ENGINE as dependency to fix build issue in master br…
Junchao-Mellanox 0606fec
Merge branch 'thermal-policy' of https://github.com/Junchao-Mellanox/…
Junchao-Mellanox 0c271cf
Change policy.json to JSON policy file
Junchao-Mellanox 71c4249
update submodule for thermal control feature
Junchao-Mellanox d3558df
Update submodule to fix conflict
Junchao-Mellanox 0829793
fix build issue by change submodule pointer
Junchao-Mellanox 0d10d75
Fix review comment: add a new line at the end of file
Junchao-Mellanox 6ad3cbb
[Mellanox/hw-mgmt]Add patch which disables thermal policy in hw-mgmt
8e97863
[Mellanox/hw-mgmt]Update the patch of disabling thermal policy for hw…
93f521b
Merge remote-tracking branch 'origin/master' into thermal-policy
Junchao-Mellanox eda8e85
[thermal control] update submodule sonic-platform-daemons
Junchao-Mellanox 6872831
[thermal control] update pointer for sonic-platform-common
Junchao-Mellanox 8fad575
Merge remote-tracking branch 'stephen/disable-hw-mgmt-thermal-policy'…
Junchao-Mellanox 3382e3d
Merge remote-tracking branch 'origin/master' into thermal-policy
Junchao-Mellanox File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../x86_64-mlnx_msn2700-r0/thermal_policy.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../x86_64-mlnx_msn2700-r0/thermal_policy.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../x86_64-mlnx_msn2700-r0/thermal_policy.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../x86_64-mlnx_msn2700-r0/thermal_policy.json |
72 changes: 72 additions & 0 deletions
72
device/mellanox/x86_64-mlnx_msn2700-r0/thermal_policy.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| { | ||
| "thermal_control_algorithm": { | ||
| "run_at_boot_up": "false", | ||
| "fan_speed_when_suspend": "60" | ||
| }, | ||
| "info_types": [ | ||
| { | ||
| "type": "fan_info" | ||
| }, | ||
| { | ||
| "type": "psu_info" | ||
| }, | ||
| { | ||
| "type": "chassis_info" | ||
| } | ||
| ], | ||
| "policies": [ | ||
| { | ||
| "name": "any fan absence", | ||
| "conditions": [ | ||
| { | ||
| "type": "fan.any.absence" | ||
| } | ||
| ], | ||
| "actions": [ | ||
| { | ||
| "type": "thermal_control.control", | ||
| "status": "false" | ||
| }, | ||
| { | ||
| "type": "fan.all.set_speed", | ||
| "speed": "100" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "name": "any psu absence", | ||
| "conditions": [ | ||
| { | ||
| "type": "psu.any.absence" | ||
| } | ||
| ], | ||
| "actions": [ | ||
| { | ||
| "type": "thermal_control.control", | ||
| "status": "false" | ||
| }, | ||
| { | ||
| "type": "fan.all.set_speed", | ||
| "speed": "100" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "name": "all fan and psu presence", | ||
| "conditions": [ | ||
| { | ||
| "type": "fan.all.presence" | ||
| }, | ||
| { | ||
| "type": "psu.all.presence" | ||
| } | ||
| ], | ||
| "actions": [ | ||
| { | ||
| "type": "fan.all.set_speed", | ||
| "speed": "60" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } |
1 change: 1 addition & 0 deletions
1
device/mellanox/x86_64-mlnx_msn2700_simx-r0/thermal_policy.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../x86_64-mlnx_msn2700-r0/thermal_policy.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../x86_64-mlnx_msn2700-r0/thermal_policy.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../x86_64-mlnx_msn2700-r0/thermal_policy.json |
1 change: 1 addition & 0 deletions
1
device/mellanox/x86_64-mlnx_msn3700_simx-r0/thermal_policy.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../x86_64-mlnx_msn2700-r0/thermal_policy.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../x86_64-mlnx_msn2700-r0/thermal_policy.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../x86_64-mlnx_msn2700-r0/thermal_policy.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| *.pyc | ||
| .cache/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| [pytest] | ||
| filterwarnings = | ||
| ignore::DeprecationWarning |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| [aliases] | ||
| test=pytest | ||
jleveque marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| __all__ = ["platform", "chassis"] | ||
| from sonic_platform import * | ||
| from sonic_platform import * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.