Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Dec 2021 09:49:30 +0200
From:      Andriy Gapon <avg@freebsd.org>
To:        Kyle Evans <kevans@freebsd.org>
Cc:        src-committers@freebsd.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: 3d9d64aa1846 - main - kern_tc: unify timecounter to bintime delta conversion
Message-ID:  <0b0a702b-4cc9-77ee-231e-6db8121af817@FreeBSD.org>
In-Reply-To: <CACNAnaFF49MVL%2B%2BRFOGbHH_dnFu7MvTHwc4zdbUN52=N=CT1bw@mail.gmail.com>
References:  <202111301334.1AUDYJEU014078@gitrepo.freebsd.org> <CACNAnaGzuJuj_eZxA3y2vGrermmhH7BWkaa2OJv_WWtGXs98Zw@mail.gmail.com> <69d4804d-1d94-7757-5c93-0d062f9c31c0@FreeBSD.org> <CACNAnaFF49MVL%2B%2BRFOGbHH_dnFu7MvTHwc4zdbUN52=N=CT1bw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 30/11/2021 23:35, Kyle Evans wrote:
> On Tue, Nov 30, 2021 at 11:08 AM Andriy Gapon <avg@freebsd.org> wrote:
>>
>> On 30/11/2021 18:14, Kyle Evans wrote:
>>> I wonder if this helps explain the behavior we saw when enabling TSC
>>> on VirtualBox guests. Threads doing small ~1 second or less sleeps
>>> would start to miss their wakeups, so we'd consistently see, e.g.,
>>> shutdown issues after applying a high loading while we're waiting for
>>> bufdaemon threads.
>>
>> It very well may be the case.
>> The reason I arrived at this change is that we also sometimes saw the same
>> problem but on VMWware.  That prompted me to add some diagnostic code to
>> sleepqueue to turn those missed wakeups into panics.
>>
>> As kib pointed out, mav recently made a change that would mask the problem as a
>> side effect:
>> https://cgit.FreeBSD.org/src/commit/?id=6df1359e5542f69179c142be1ea099d447e273d1
>> But I wanted to fix the root cause anyway.
>>
> 
> Ok, cool, thanks!
> 
> I'll do some re-testing under VirtualBox and see if we can just revert
> this entirely: https://cgit.freebsd.org/src/commit/sys/x86/x86/tsc.c?id=8cc15b0dfc2f3299

That would be an interesting test.

Just a thought that there could be other problems with VirtualBox.
When I debugged the problem with VMWare, changing timecounters did not help 
because, in hindsight, the issue was not specific to any particular one.

So, perhaps the VirtualBox TSC wraps around too fast or can jump erratically, etc.

-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0b0a702b-4cc9-77ee-231e-6db8121af817>