lkml.org 
[lkml]   [1996]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Small speedup for 'system_call'
Date
> I was reading the system call entry code in arch/i386/kernel/entry.S.
> This is from 2.1.7:

That reminds me. Here is another one

> movl SYMBOL_NAME(sys_call_table)(,%eax,4),%eax
> testl %eax,%eax
> je ret_from_sys_call

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Bletch. Just load empty syscall table entries with the function vector
of a routine that returns -ENOSYS. That saves another 2 or 3 clocks on
every single system call. Even if you dont expand the table.

> testb $0x20,flags(%ebx) # PF_TRACESYS
> jne tracesys
> call *%eax
> movl %eax,EAX(%esp) # save the return value
> ALIGN
> .globl ret_from_sys_call
> ret_from_sys_call:

ret_from_sys_call could be a lot shorter if we had 'fast_ret_from_syscall'
and signal handlers and other stuff called

complex_return();

which swapped the return address or set a single flag that jumped around
all the reschedule, signal and other tests.

Alan


\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.043 / U:1.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site