Peformance issues with r278325
John Baldwin
jhb at freebsd.org
Fri Mar 18 19:56:19 UTC 2016
On Friday, March 18, 2016 02:49:19 PM Ryan Stone wrote:
> On Fri, Mar 18, 2016 at 1:37 PM, John Baldwin <jhb at freebsd.org> wrote:
>
> > I think I'll likely just convert it to use a direct
> > TSC delay loop always in HEAD (assuming that verifies ok in testing as
> > well).
> >
>
> Couldn't that work incorrectly on VM guests? The tsc is not guaranteed to
> be monotonic in that environment.
DELAY() is already using TSC there (unless the guest has disabled TSC
entirely which is unlikely). Using a direct TSC deadline means that we can
break out of the loop as soon as the previous IPI unpends while still having
a somewhat reasonable deadline timeout while checking the status of the
previous IPI at a finer granularity than 1 usec. Of course, as kib@ noted,
x2APIC doesn't suffer from this at all as IPI sends are "atomic" on x2APIc,s
x2APIC is a better all-around solution when available.
--
John Baldwin
More information about the freebsd-hackers
mailing list