Re: [PATCH] i386 entry.S alignment tweak

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Mon, 14 Dec 1998 01:14:42 +0000


On Sat, Dec 12, 1998 at 01:40:33PM -0800, Linus Torvalds wrote:
> On Fri, 11 Dec 1998, MOLNAR Ingo wrote:
> > either we align system_call, or we align ret_from_sys_call, we cant have
> > both. Given that ret_from_sys_call is shared with IRQ handlers, it's
> > better performance-wise to align that one.
>
> Don't bother about IRQ handlers. Either they take a cache miss or they
> don't, it's not something we should worry about: if the interrupts happen
> so much that it matters then the system is not very usable anyway for
> completely other reasons than one cache miss.
>
> It's only system calls we really want to have minimal cache footprints and
> good behaviour - ie the entrypoint should be aligned, and the mid-way
> point should _not_ have extra nop's to align it. System calls are
^^^^^^^^^^^^^^^^^^^^
> critical, and can often be entered with cold caches.

So you want this patch then?

BTW, they're not nop instructions these days: they're the largest
filler instructions gas can put in, so an alignment of a few bytes
needn't take any longer to execute than a single byte alignment.

Enjoy,
-- Jamie

--- linux/arch/i386/kernel/entry.S.devel Sun Dec 6 15:44:17 1998
+++ linux/arch/i386/kernel/entry.S Mon Dec 14 01:07:29 1998
@@ -176,7 +176,6 @@
jne tracesys
call *SYMBOL_NAME(sys_call_table)(,%eax,4)
movl %eax,EAX(%esp) # save the return value
- ALIGN
.globl ret_from_sys_call
.globl ret_from_intr
ret_from_sys_call:

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/