Messages in this thread |  | | From | (Alan Cox) | Subject | Re: Small speedup for 'system_call' | Date | Mon, 4 Nov 1996 21:52:57 +0000 (GMT) |
| |
> 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
|  |