Re: [RFC][PATCH] linux-2.6.2-rc2_vsyscall-gtod_B1.patch

Eric W. Biederman
2004-01-31T06:01:14Z

Jamie Lokier <jamie@shareable.org> writes:

> Eric W. Biederman wrote:
> > With the x86-64 optimized vsyscall the syscall number does
> > not need to be placed into a register, because you have used
> > the proper entry point. For any syscall worth tuning in
> > user space I suspect that level of optimization would be
> > beneficial. A fast call path that does not waste a register.
>
> The cost of loading a constant into a register is _much_ lower than
> the cost of indirect jumps which we have been discussing.

I was thinking more of the register pressure in the load.

But in the case of gettimeofday I think it makes to do a kernel
implementation that is argument compatible with libc and then linker
magic could just short circuit the calls to the vsyscall page and libc
would not need to get involved at all, which removes one of the
indirect calls.

We could probably do that today by just renaming the function
gettimeofday. But that is rude and has name space pollution issues.

Eric