-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add thermal control support for SONiC (#3949)
- Loading branch information
1 parent
67f520f
commit be549db
Showing
38 changed files
with
1,021 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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 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 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 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 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 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
31 changes: 31 additions & 0 deletions
31
...rm/mellanox/hw-management/0002-hw-management.sh-Disable-thermal-policy-running-in-h.patch
This file contains 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,31 @@ | ||
From 76b02916794be2e2558fcff1d11609a594f633d7 Mon Sep 17 00:00:00 2001 | ||
From: Stephen Sun <stephens@mellanox.com> | ||
Date: Fri, 14 Feb 2020 13:48:00 +0800 | ||
Subject: [PATCH] Disable thermal policy running in hw-mgmt service SONiC | ||
thermal control algorithm has been supported. | ||
|
||
Signed-off-by: Stephen Sun <stephens@mellanox.com> | ||
--- | ||
usr/usr/bin/hw-management.sh | 6 +++++- | ||
1 file changed, 5 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/usr/usr/bin/hw-management.sh b/usr/usr/bin/hw-management.sh | ||
index 2cdbfb2..48b41d5 100755 | ||
--- a/usr/usr/bin/hw-management.sh | ||
+++ b/usr/usr/bin/hw-management.sh | ||
@@ -799,7 +799,11 @@ do_start() | ||
#disabled for leopard chipless bringup. | ||
echo 1 > $config_path/suspend | ||
|
||
- $THERMAL_CONTROL $thermal_type $max_tachos $max_psus& | ||
+# | ||
+# Disable thermal control algorithm in hw-management service | ||
+# because there has already been that in SONiC | ||
+# | ||
+# $THERMAL_CONTROL $thermal_type $max_tachos $max_psus& | ||
} | ||
|
||
do_stop() | ||
-- | ||
1.9.1 | ||
|
This file contains 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 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 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 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 |
This file contains 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 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 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 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 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 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.