Re: Intel P6 vs P7 system call performance
Stephen Rothwell (sfr@canb.auug.org.au)
Tue, 24 Dec 2002 11:22:33 +1100
On Tue, 24 Dec 2002 00:27:43 +0100 Petr Vandrovec <vandrove@vc.cvut.cz> wrote:
>
> On Sun, Dec 22, 2002 at 09:03:44PM -0800, Linus Torvalds wrote:
> >
> > How does the attached patch work for people? I've verified that
> > single-stepping works, and I've also verified that it does improve
> > performance for simple system calls. Everything looks quite simple.
>
> > ===== arch/i386/kernel/sysenter.c 1.4 vs edited =====
> > --- 1.4/arch/i386/kernel/sysenter.c Sat Dec 21 16:02:02 2002
> > +++ edited/arch/i386/kernel/sysenter.c Sun Dec 22 20:17:28 2002
> > @@ -54,19 +54,18 @@
> > 0xc3 /* ret */
> > };
> > static const char sysent[] = {
> > - 0x9c, /* pushf */
> > 0x51, /* push %ecx */
> > 0x52, /* push %edx */
> > 0x55, /* push %ebp */
> > 0x89, 0xe5, /* movl %esp,%ebp */
> > 0x0f, 0x34, /* sysenter */
> > + 0x00, /* align return point */
> > /* System call restart point is here! (SYSENTER_RETURN - 2) */
> > 0xeb, 0xfa, /* jmp to "movl %esp,%ebp" */
>
> Hi Linus,
>
> Jump instruction should be 0xeb, 0xf9, with 0xeb, 0xfa it jumps into
> the middle of movl %esp,%ebp because of added alignment.
And if you change the 0x00 use for alighment to 0x90 (nop) you can
use gdb to disassemble that array of bytes to check any changes ...
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/