[lkml]   [2000]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: {PATCH] Re: wasting time on page fault
On Tue, 10 Oct 2000, Jamie Lokier 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.
>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.

To check this I wrote a kernel patch [*] to count the number of times
each fault source occurs. During a 2hr hacking session (boot, start X,
fvwm2, emacs, 2 xterms, unpacking tarballs, cvs checkouts and makes),
page_fault accounted for 99.8% of all faults. The remaining cases were
almost all device_not_available, which I believe is an artifact of lazy
FP state save/restore. I used the SML/NJ compiler to build one package,
and this triggered 15 overflow faults. No other faults occurred.

[*] In case anyone wants to try the patch on their own workloads, I put
it at

So I agree with Jamie: the right thing to do is probably to just remove
the ALIGN before error_code and have page_fault fall through, with no
jumps or (pseudo-)nops.

Linus, do you agree? If so I'll send a patch against test10-pre.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:39    [W:0.035 / U:3.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site