Messages in this thread | | | Date | Tue, 18 Sep 2012 20:02:00 +0200 | From | Richard Cochran <> | Subject | Re: [PATCH 0/6][RFC] Rework vsyscall to avoid truncation/rounding issue in timekeeping core |
| |
On Mon, Sep 17, 2012 at 05:20:41PM -0700, John Stultz wrote: > On 09/17/2012 04:49 PM, Andy Lutomirski wrote: > >2. There's nothing vsyscall-specific about the code in > >vclock_gettime.c. In fact, the VVAR macro should work just fine in > >kernel code. If you moved all this code into a header, then in-kernel > >uses could use it, and maybe even other arches could use it. Last > >time I checked, it seemed like vclock_gettime was considerably faster > >than whatever the in-kernel equivalent did. > I like the idea of unifying the implementations, but I'd want to > know more about why vclock_gettime was faster then the in-kernel > getnstimeofday(), since it might be due to the more limited locking > (we only update vsyscall data under the vsyscall lock, where as the > timekeeper lock is held for the entire execution of > update_wall_time()), or some of the optimizations in the vsyscall > code is focused on providing timespecs to userland, where as > in-kernel we also have to provide ktime_ts.
This there a valid technical reason why each arch has its own vdso implementation?
If not, I would suggest that the first step would be to refactor these into one C-language header. If this can be shared with kernel code, then all the better.
It would make it a lot easier to fix the leap second thing, too.
Thanks, Richard
| |