lkml.org 
[lkml]   [2000]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: {PATCH] Re: wasting time on page fault
Andi Kleen wrote:
> > 1. Move the error_code block from divide_error to page_fault;
> > this removes one jump from the page_fault path.
>
> It is not clear that it is worth it. You want to align error_code and
> page_fault to 16 or 32 bytes bytes at least, and it would need to execute
> some nops depending on the length for fallthrough
> The jmp may be actually faster.

The assembler doesn't use nops for alignment -- it inserts longer
instructions that are effectively nops, either 1 or two. For larger
stretches, the assembler inserts a jmp itself for alignment.

Regardless, I'd expect the page_fault path to occur far more often than
any of the other fault/exception handlers that lead to error_code. So
much more that not aligning error_code is probably the right thing to do.

-- Jamie
-
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/

\
 
 \ /
  Last update: 2005-03-22 12:39    [from the cache]
©2003-2011 Jasper Spaans