Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Jan 2015 19:06:22 -0600
From:      Bryan Venteicher <bryanv@daemoninthecloset.org>
To:        Peter Jeremy <peter@rulingia.com>
Cc:        FreeBSD-current <freebsd-current@freebsd.org>, "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org>
Subject:   Re: [CFT] Paravirtualized KVM clock
Message-ID:  <CAMo0n6RYH-XvKkpKL09ZDC3HWpGUBjY6nLsogs0oAZU69J%2BEVA@mail.gmail.com>
In-Reply-To: <20150121211500.GA32478@server.rulingia.com>
References:  <CAMo0n6QUp3iZ2fEqbrsD2MhEsWWOPTLisd9iB7TNEvbevcK0Fw@mail.gmail.com> <20150121211500.GA32478@server.rulingia.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jan 21, 2015 at 3:15 PM, Peter Jeremy <peter@rulingia.com> wrote:

> On 2015-Jan-04 11:56:14 -0600, Bryan Venteicher <
> bryanv@daemoninthecloset.org> wrote:
> >For the last few weeks, I've been working on adding support for KVM clock
> >in the projects/paravirt branch. Currently, a KVM VM guest will end up
> >selecting either the HPET or ACPI as the timecounter source.
> Unfortunately,
> >this is very costly since every timecounter fetch causes a VM exit. KVM
> >clock allows the guest to use the TSC instead; it is very similar to the
> >existing Xen timer.
>
> A somewhat late response but have you looked at
>
> https://github.com/blitz/freebsd/commit/cdc5f872b3e48cc0dda031fc7d6bdedc65c3148f
> I've been running this[*] on a Google Compute Engine instance for about 6
> months without problems.
>
>
A goal of my work was to put a bit of infrastructure in place so FreeBSD
can support pvops across a variety of hypervisors. KVMCLOCK happens to be
about the easiest to implement, and has a decent performance win for many
situations.

I think that commit is broken on SMP guests: CPU_FOREACH() does not switch
the current CPU, so it just keeps writing to the MSR on the BSP.

[*] I had to patch out the test for KVM_FEATURE_CLOCKSOURCE_STABLE_BIT but
>     I think that's a GCE issue.
>
> --
> Peter Jeremy
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMo0n6RYH-XvKkpKL09ZDC3HWpGUBjY6nLsogs0oAZU69J%2BEVA>