Don't save registers during system calls

Alexander Kjeldaas (astor@guardian.no)
Thu, 16 Apr 1998 23:21:19 +0200


There is currently an interesting thread on comp.arch discussing
whether we really need to save registers during system calls. It seems
that this is not requires and could save a few % on RISCs.

In Linux, it seems like this means moving the register-saving from
arch/*/kernel/entry.S to include/asm-*/system.h and the switch_to
macro. In addition, you have to scramble clobber registers on exit
from the kernel in entry.S, but that's a very fast operation. You only
save registers when you switch the currently runnig task on a
processor, not when crossing the kernel<->user-level boundary. This is
only beneficial if the number of switches inside the kernel is lower
than the number of system-calls which I assume is true. This isn't
much point in doing on x86, but for RISCs and merced it could be
interesting.

astor

-- 
 Alexander Kjeldaas, Guardian Networks AS, Trondheim, Norway
 http://www.guardian.no/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu