lkml.org 
[lkml]   [2007]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: 2.6.23-rc3-mm1 - vdso and gettimeofday issues with glibc
Date

> In the vdso code:
>
> static inline long vgetns(void)
> {
> cycles_t (*vread)(void);
> vread = gtod->clock.vread;
> return ((vread() - gtod->clock.cycle_last) * gtod->clock.mult) >>
> gtod->clock.shift;
> }
>
>
> Looks like an open-coded version of this in the kernel timekeeping code:

vdso code needs to be all inlined because the vdso runs in ring 3 and cannot
access other kernel code.

It was opencoded it to have more control over the code (vdso requirements
are a bit peculiar).

> But the vdso version isn't doing any masking. And the mask is different for
> different clocksources, so it has to track the underlying kernel's clocksource
> when it gets changed.

vdso effectively only supports TSC and HPET (the other clock sources are not accessible
from ring 3)

TSC doesn't need a mask, but many HPETs need a 32bit mask; good point.

Does adding the mask to vgetns make the clock problems go away?

-Andi

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

\
 
 \ /
  Last update: 2007-09-08 11:01    [W:0.564 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site