[Mellanox] fix fan speed tolerance from hardcode to hw-mgmt sysfs reading#28598
Open
yuazhe wants to merge 1 commit into
Open
[Mellanox] fix fan speed tolerance from hardcode to hw-mgmt sysfs reading#28598yuazhe wants to merge 1 commit into
yuazhe wants to merge 1 commit into
Conversation
Signed-off-by: Yuanzhe Liu <yualiu@nvidia.com>
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why I did it
The fixed 50% tolerance is too tight for PSU fans and can cause false low-speed warnings when the actual speed is just below the threshold, such as 29% against a 60% target. Using the PSU fan’s actual min/max RPM range makes the tolerance reflect the hardware behavior more accurately.
Work item tracking
How I did it
Overrode get_speed_tolerance() in PsuFan to read psu{N}_fan_min and psu{N}_fan_max from hw-management, then convert them to a percentage with 100 * min_rpm // max_rpm. If max_rpm is 0, it falls back to the default 50% tolerance.
How to verify it
Check that /var/run/hw-management/thermal/psu{N}_fan_min and psu{N}_fan_max contain valid values, then restart pmon and monitor thermalctld logs. The repeated Fan low speed warning around 29% current speed and 60% target speed should no longer appear as a false warning.
Which release branch to backport (provide reason below if selected)
Tracking issue/work item for backport/cherry-pick request (GitHub issue or Microsoft ADO):
Failure type:
Tested branch
Test result
202605: 20260531.42
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)