Re: [PATCH] Only process_die notifier in ia64_do_page_fault if KPROBES is configured.

Christoph Lameter
2005-08-30T23:55:13Z

On Wed, 31 Aug 2005, Andi Kleen wrote:

> Also with the inline the test should be essentially a single test of
> a global variable and jump. Hardly a big performance issue, no?

There are multiple effects of this code.

- Additional cacheline in use in the page fault handler
increasing the cache foot print.

- There are registers in use for checking the global variable.

- The compilers will reserve registers for the code that is never
executed which may affect other elements of performance. From the
register perspective a function call may be better on ia64.

Certainly not a big effect (if we make sure the compiler knows that
this test mostly fails and insure that the variable is in
__mostly_read) but this is a frequently executed code path and the code
is there without purpose if CONFIG_KPROBES is off.

It wont get too bad unless lots of other people have similar ideas about
fixing their race conditions using similar methods. But we will be setting
a bad precedent if we allow this.