Re: wasting time on page fault

From: Andi Kleen (ak@suse.de)
Date: Wed Oct 04 2000 - 11:11:46 EDT

  • Next message: Daniel Phillips: "Re: Status of ReiserFS + Journalling"

    On Wed, Oct 04, 2000 at 11:00:41AM -0400, Brian Gerst wrote:
    > Mikulas Patocka wrote:
    > >
    > > Hi.
    > >
    > > arch/i386/kernel/entry.S
    > > xchgl %eax, ORIG_EAX(%esp) # orig_eax (get the error code. )
    > > movl %esp,%edx
    > > xchgl %ecx, ES(%esp) # get the address and save es.
    > > pushl %eax # push the error code
    > >
    > > xchg with memory operand has implicit lock prefix and is slooooooow. It is
    > > really bad idea to have it in page fault handler.
    >
    > Thank the small register set of the x86 for this. If you can come up
    > with a way to do it in fewer cycles and preserve all the registers and
    > stack layout, your input is welcome.

    You don't need to preserve any registers which are not %eax, they are already
    saved. There are tons of ways to do it via the stack or with a temporary
    register.

    -Andi

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



    This archive was generated by hypermail 2b29 : Wed Oct 04 2000 - 11:15:03 EDT