Re: [PATCH] x86, TSC: Add a software TSC offset

From: Thomas Gleixner
Date: Mon Jul 21 2014 - 18:06:39 EST


On Mon, 21 Jul 2014, Andy Lutomirski wrote:
> On Mon, Jul 21, 2014 at 2:52 PM, Borislav Petkov <bp@xxxxxxxxx> wrote:
> > On Mon, Jul 21, 2014 at 02:41:50PM -0700, Andy Lutomirski wrote:
> >> How will this be compatible with the vdso?
> >
> > I've never thought about it yet. How compatible would you want it to be
> > and what do you expect from it?
>
> I expect that users of __vdso_clock_gettime (e.g. glibc) will get the
> correct time :) They use vread_tsc, and they can't use
> preempt_disable, because they're in userspace. They also can't
> directly access per-cpu variables.
>
> Turning off vdso tsc support on these machines would be an option.

Correct.

So if we make the TSC usable that way we need to mark it unusable for
the VDSO and force vdso_*gettime* into the kernel. That will be way
better than forcing the whole machine onto HPET.

And once we are using the real syscall, the whole thing just works ...

Thanks,

tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/