compress the stack layout of do_page_fault(), x86
Review
Quoted 3 lines · Ingo Molnar
(quoted diff) +2
-0+static void force_sig_info_fault(int si_signo, int si_code, + unsigned long address, struct task_struct *tsk)
This won't work with a unit-at-a-time compiler which happily inlines everything static with only a single caller. Use noinline
-Andi
Quoted 7 lines · Andi Kleen
Review
Quoted 3 lines · Ingo Molnar
(quoted diff) +2
-0+static void force_sig_info_fault(int si_signo, int si_code, + unsigned long address, struct task_struct *tsk)This won't work with a unit-at-a-time compiler which happily inlines everything static with only a single caller. Use noinline
but.... the x86 kernel is -fno-unit-at-a-time.... for stack reasons ;)
Quoted 10 lines · Arjan van de Ven
Quoted 7 lines · Andi Kleen
Review
Quoted 3 lines · Ingo Molnar
(quoted diff) +2
-0+static void force_sig_info_fault(int si_signo, int si_code, + unsigned long address, struct task_struct *tsk)This won't work with a unit-at-a-time compiler which happily inlines everything static with only a single caller. Use noinline
but.... the x86 kernel is -fno-unit-at-a-time.... for stack reasons ;)
The gcc people are making noises of removing that. So eventually it will need to go.
Also some kernels are compiled with that option removed and it works just fine.
-Andi
Quoted 7 lines · Andi Kleen
Review
Quoted 3 lines · Ingo Molnar
(quoted diff) +2
-0+static void force_sig_info_fault(int si_signo, int si_code, + unsigned long address, struct task_struct *tsk)This won't work with a unit-at-a-time compiler which happily inlines everything static with only a single caller. Use noinline
this function has two callers.
Ingo
Quoted 10 lines · Andi Kleen
Quoted 9 lines · Arjan van de Ven
Quoted 7 lines · Andi Kleen
Review
Quoted 3 lines · Ingo Molnar
(quoted diff) +2
-0+static void force_sig_info_fault(int si_signo, int si_code, + unsigned long address, struct task_struct *tsk)This won't work with a unit-at-a-time compiler which happily inlines everything static with only a single caller. Use noinline
Quoted 4 lines
Quoted 1 line
but.... the x86 kernel is -fno-unit-at-a-time.... for stack reasons ;)
The gcc people are making noises of removing that. So eventually it will need to go.
the gcc people also fixed the stack usage on inlining (at least this specific class) in CVS HEAD so the "problem" is a lot smaller whenever they make it go away.
Quoted 5 lines · Ingo Molnar
Quoted 2 lines · Andi Kleen
Quoted 1 line · Ingo Molnar
Quoted 7 lines
Quoted 5 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+static void force_sig_info_fault(int si_signo, int si_code, + unsigned long address, struct task_struct *tsk)This won't work with a unit-at-a-time compiler which happily inlines everything static with only a single caller. Use noinline
this function has two callers.
Even then it's still better to mark it noinline, otherwise a different inlining algorithm in a new compiler might do the wrong thing. It's also useful documentation.
-Andi
Quoted 12 lines · Andi Kleen
Quoted 11 lines · Ingo Molnar
Quoted 7 lines · Andi Kleen
Review
Quoted 3 lines · Ingo Molnar
(quoted diff) +2
-0+static void force_sig_info_fault(int si_signo, int si_code, + unsigned long address, struct task_struct *tsk)This won't work with a unit-at-a-time compiler which happily inlines everything static with only a single caller. Use noinline
Quoted 5 lines
Quoted 1 line
this function has two callers.
Even then it's still better to mark it noinline, otherwise a different inlining algorithm in a new compiler might do the wrong thing. It's also useful documentation.
ok, agreed. Delta patch below.
Ingo
----
make force_sig_info_fault() noinline, suggested by Andi Kleen.
arch/i386/mm/fault.c renamed from arch/i386/mm/fault.c.orig +2 -2
@@ -199,8 +199,8 @@ static inline int is_prefetch(struct pt_return 0 ; } -static void force_sig_info_fault (int si_signo,int si_code, -unsigned long address,struct task_struct *tsk) +static noinline void force_sig_info_fault(int si_signo, int si_code, +unsigned long address,struct task_struct *tsk) {siginfo_t info;