Linux-kernel mailing list archive 2000-40,: Re: wasting time on page fault

# Re: wasting time on page fault

Brian Gerst (bgerst@didntduck.org)
Wed, 04 Oct 2000 11:00:41 -0400

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Daniel Phillips: "Re: Tux2 - evil patents sighted"
- Previous message: =?iso-8859-1?Q?Abel_Mu=F1oz_Alcaraz?=: "RE: execve replacement."
- Maybe in reply to: Mikulas Patocka: "wasting time on page fault"
- Next in thread: Brian Gerst: "Re: wasting time on page fault"

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.

    --

    				Brian Gerst
    -
    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/

- Next message: Daniel Phillips: "Re: Tux2 - evil patents sighted"
- Previous message: =?iso-8859-1?Q?Abel_Mu=F1oz_Alcaraz?=: "RE: execve replacement."
- Maybe in reply to: Mikulas Patocka: "wasting time on page fault"
- Next in thread: Brian Gerst: "Re: wasting time on page fault"