Skip to content

Commit

Permalink
hw-mgmt: infra: Optimize PSU init time
Browse files Browse the repository at this point in the history
For PSU on udev event we have a delay 2 sec which is needed to
allow PSU controller to stabilize. This delay of 2 sec can be too much.

In this change, we replaced constant delay to PSU attribute polling,
which can help us to get the exact time when PSU is ready and reduce
wait time for PSU attributes init.

Signed-off-by: Oleksandr Shamray <[email protected]>
  • Loading branch information
sholeksandr committed Feb 19, 2024
1 parent 6e53ad5 commit 0138e18
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion usr/usr/bin/hw-management-thermal-events.sh
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,8 @@ if [ "$1" == "add" ]; then
exit 0
fi
# Allow PS controller to stabilize
sleep 2
retry_helper "ls" 0.2 20 "$2 takes too long to init" "$5""$3"/in1_input
sleep 1
# Set I2C bus for psu
echo "$bus" > $config_path/"$psu_name"_i2c_bus
# Set default fan speed
Expand Down

0 comments on commit 0138e18

Please sign in to comment.