Skip to content

Commit

Permalink
Change clocksource only if using xen
Browse files Browse the repository at this point in the history
  • Loading branch information
jacknagel authored and mogren committed Jun 12, 2019
1 parent 16bd031 commit f2525cb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions install-worker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ cat <<EOF | sudo tee -a /etc/chrony.conf
rtcsync
EOF

# Make tsc the clock source
if grep --quiet tsc /sys/devices/system/clocksource/clocksource0/available_clocksource; then
# If current clocksource is xen, switch to tsc
if grep --quiet xen /sys/devices/system/clocksource/clocksource0/current_clocksource &&
grep --quiet tsc /sys/devices/system/clocksource/clocksource0/available_clocksource; then
echo "tsc" | sudo tee /sys/devices/system/clocksource/clocksource0/current_clocksource
else
echo "tsc as a clock source is not applicable, skipping."
Expand Down

0 comments on commit f2525cb

Please sign in to comment.