[lkml]   [2002]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Intel P6 vs P7 system call performance

On Tue, 17 Dec 2002, Ulrich Drepper wrote:
> The problem with the current solution is the instruction set of the x86.
> In your test code you simply use call 0xfffff000 and it magically work.
> But this is only the case because your program is linked statically.

Yeah, it's not very convenient. I didn't find any real alternatives,
though, and you can always just put 0xfffff000 in memory or registers and
jump to that. In fact, I suspect that if you actually want to use it in
glibc, then at least in the short term that's what you need to do anyway,
sinc eyou probably don't want to have a glibc that only works with very
recent kernels.

So I was actually assuming that the glibc code would look more like
something like this:

int $0x80

unsigned long system_call_ptr = old_fashioned;

/* .. startup .. */
if (kernel_version > xxx)
system_call_ptr = 0xfffff000;

/* ... usage ... */
call *system_call_ptr;

since you cannot depend on the 0xfffff000 on older kernels anyway..

> Instead I've changed the syscall handling to effectve do
> pushl %ebp
> movl $0xfffff000, %ebp
> call *%ebp
> popl %ebp

The above will work, but then you'd have limited yourself to a binary that
_only_ works on new kernels. So I'd suggest the memory indirection


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:31    [W:0.305 / U:0.216 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site