[DellEMC] S6100 Platform Service optimization (#10989)
Why I did it - To reduce rc.local script execution time. - Time consumption of rc.local script is around 22 seconds in S6100. How I did it - Moving platform-modules-s6100.service and s6100-lpc-monitor.service asynchronous to rc.local script. How to verify it - Load the image with the changes and the time consumption of rc.local script reduced from 22 seconds(approx.) to 14 seconds(approx.) during warm-/fast-reboot upgrades. - sonic-mgmt test results.
This commit is contained in:
parent
86f5dfc1f9
commit
7a7c363548
@ -1,40 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: setup-board
|
||||
# Required-Start:
|
||||
# Required-Stop:
|
||||
# Should-Start:
|
||||
# Should-Stop:
|
||||
# Default-Start: S
|
||||
# Default-Stop: 0 6
|
||||
# Short-Description: Setup S6100 board.
|
||||
### END INIT INFO
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Setting up board... "
|
||||
|
||||
/usr/local/bin/iom_power_on.sh
|
||||
/usr/local/bin/s6100_platform.sh init
|
||||
|
||||
echo "done."
|
||||
;;
|
||||
|
||||
stop)
|
||||
/usr/local/bin/s6100_platform.sh deinit
|
||||
echo "done."
|
||||
|
||||
;;
|
||||
|
||||
force-reload|restart)
|
||||
echo "Not supported"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: /etc/init.d/platform-modules-s6100.init {start|stop}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
@ -1,11 +1,7 @@
|
||||
# postinst script for S6100
|
||||
|
||||
# Enable Dell-S6100-platform-service
|
||||
depmod -a
|
||||
systemctl enable platform-modules-s6100.service
|
||||
systemctl start platform-modules-s6100.service
|
||||
|
||||
systemctl enable s6100-lpc-monitor.service
|
||||
systemctl start s6100-lpc-monitor.service
|
||||
systemctl start --no-block platform-modules-s6100.service
|
||||
|
||||
#DEBHELPER#
|
||||
|
@ -78,6 +78,9 @@ override_dh_auto_install:
|
||||
|
||||
override_dh_usrlocal:
|
||||
|
||||
override_dh_installmodules:
|
||||
dh_installmodules --no-scripts;
|
||||
|
||||
override_dh_clean:
|
||||
dh_clean
|
||||
set -e; \
|
||||
|
@ -3,6 +3,30 @@
|
||||
#platform init script for Dell S6100
|
||||
|
||||
if [[ "$1" == "init" ]]; then
|
||||
depmod -a
|
||||
case "$(cat /proc/cmdline)" in
|
||||
*SONIC_BOOT_TYPE=warm*)
|
||||
TYPE='warm'
|
||||
;;
|
||||
*SONIC_BOOT_TYPE=fastfast*)
|
||||
TYPE='fastfast'
|
||||
;;
|
||||
*SONIC_BOOT_TYPE=fast*|*fast-reboot*)
|
||||
TYPE='fast'
|
||||
;;
|
||||
*SONIC_BOOT_TYPE=soft*)
|
||||
TYPE='soft'
|
||||
;;
|
||||
*)
|
||||
TYPE='cold'
|
||||
esac
|
||||
|
||||
if [[ "$TYPE" == "cold" ]]; then
|
||||
/usr/local/bin/iom_power_on.sh
|
||||
fi
|
||||
|
||||
systemctl enable s6100-lpc-monitor.service
|
||||
systemctl start --no-block s6100-lpc-monitor.service
|
||||
|
||||
pericom="/sys/bus/pci/devices/0000:08:00.0"
|
||||
modprobe i2c-dev
|
||||
@ -24,23 +48,6 @@ if [[ "$1" == "init" ]]; then
|
||||
|
||||
systemctl start --no-block s6100-ssd-upgrade-status.service
|
||||
|
||||
case "$(cat /proc/cmdline)" in
|
||||
*SONIC_BOOT_TYPE=warm*)
|
||||
TYPE='warm'
|
||||
;;
|
||||
*SONIC_BOOT_TYPE=fastfast*)
|
||||
TYPE='fastfast'
|
||||
;;
|
||||
*SONIC_BOOT_TYPE=fast*|*fast-reboot*)
|
||||
TYPE='fast'
|
||||
;;
|
||||
*SONIC_BOOT_TYPE=soft*)
|
||||
TYPE='soft'
|
||||
;;
|
||||
*)
|
||||
TYPE='cold'
|
||||
esac
|
||||
|
||||
if [[ "$TYPE" == "cold" ]]; then
|
||||
systemctl start s6100-platform-startup.service
|
||||
else
|
||||
|
@ -1,6 +1,6 @@
|
||||
[Unit]
|
||||
Description=Dell S6100 Platform modules
|
||||
Before=pmon.service determine-reboot-cause.service
|
||||
Before=pmon.service determine-reboot-cause.service pcie-check.service system-health.service watchdog-control.service
|
||||
DefaultDependencies=no
|
||||
|
||||
[Service]
|
||||
|
@ -1,6 +1,6 @@
|
||||
[Unit]
|
||||
Description=Dell S6100 Platform Startup Service
|
||||
Before=pmon.service determine-reboot-cause.service
|
||||
Before=pmon.service determine-reboot-cause.service pcie-check.service system-health.service watchdog-control.service
|
||||
DefaultDependencies=no
|
||||
|
||||
[Service]
|
||||
|
Reference in New Issue
Block a user