[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAF1ivSbVZVSibZq+=VaDrETP_hEurCyyftCCaDEMa5r7HAV67A@mail.gmail.com>
Date: Wed, 26 Mar 2025 08:54:27 -0700
From: Ming Lin <minggr@...il.com>
To: David Woodhouse <dwmw2@...radead.org>
Cc: Sean Christopherson <seanjc@...gle.com>, kvm@...r.kernel.org,
Paolo Bonzini <pbonzini@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: pvclock time drifting backward
On Tue, Mar 25, 2025 at 4:07 AM David Woodhouse <dwmw2@...radead.org> wrote:
>
> On Mon, 2025-03-24 at 15:54 -0700, Sean Christopherson wrote:
> >
> > David can confirm, but I'm pretty sure the drift you are observing is addressed
> > by David's series to fix a plethora of kvmclock warts.
> >
> > https://lore.kernel.org/all/20240522001817.619072-1-dwmw2@infradead.org
>
> Yes, that looks like exactly the problem my series is addressing. We
> shouldn't update the pvclock so often. And if/when we do, we shouldn't
> clamp it to some *other* clock which progresses at a different rate to
> the pvclock, because that causes steps in the pvclock.
I applied the patch series on top of 6.9 cleanly and tested it with my
debug tool patch.
But it seems the time drift still increased monotonically.
Would you help take a look if the tool patch makes sense?
https://github.com/minggr/linux/commit/5284a211b6bdc9f9041b669539558a6a858e88d0
The tool patch adds a KVM debugfs entry to trigger time calculations
and print the results.
See my first email for more detail.
Test Script:
#!/bin/bash
qemu_pid=$(pidof qemu-system-x86_64)
while [ 1 ] ; do
echo "====================================="
echo "Guest OS running time: $(ps -p $qemu_pid -o etime= | awk
'{print $1}')"
cat /sys/kernel/debug/kvm/*/pvclock
echo
sleep 10
done
Thanks,
Ming
Powered by blists - more mailing lists