lkml.org 
[lkml]   [2004]   [Feb]   [6]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSat, 7 Feb 2004 03:18:40 +0000
FromJamie Lokier <>
SubjectRe: [RFC][PATCH] linux-2.6.2_vsyscall-gtod_B2.patch
Andrea Arcangeli wrote:
> On Thu, Feb 05, 2004 at 07:10:46PM -0800, john stultz wrote:
> > @@ -6,6 +9,8 @@> >  	.globl __kernel_vsyscall
> >  	.type __kernel_vsyscall,@function
> >  __kernel_vsyscall:
> > +	cmp $__NR_gettimeofday, %eax
> > +	je .Lvgettimeofday
> >  .LSTART_vsyscall:> > this is the sort of slowdown that could be avoided with the fixed
> address.> > ... the worst part is that not> only it makes gettimeofday slower, it makes _all_ the syscall slower

Andrea, please keep this argument separate from the argument about
varying vdso addresses.

The Glibc method of calling syscalls is already sub-optimal: the two
instructions in the above patch are nothing, time wise, compared with
the segment-prefixed indirect jump in Glibc and the branches which
check for and toggle POSIX asynchronous cancellations.

Other libcs might be more direct about the syscalls, and then it is
nice to imagine the optimal vdso for them.  But other libcs don't have
to enter the vdso at all, they can just copy the initial instructions
of the vdso and optimise away the path not taken (checking at run time
whether they match the current kernel's vdso of course).  Thus an
optimal vdso isn't strictly required for those of us who are into
hard core binary optimisation.

-- Jamie
-
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: 2005-03-22 13:00    [from the cache]
©2003-2008