Re: [PATCH 0/2] Use named address spaces for percpu data

From: Ingo Molnar
Date: Wed Sep 12 2018 - 17:06:39 EST



* Richard Henderson <rth@xxxxxxxxxxx> wrote:

> On 09/12/2018 07:44 AM, Matthew Wilcox wrote:
> > rth wrote a patch back in 2016 that uses gcc's address space machinery
> > to improve code generation for percpu accesses. Ingo asked for some
> > minor changes to be made, but Richard didn't respond. While looking at
> > something related, I came across them, and asked Richard's permission
> > to resurrect and resend the patch, with the changes Ingo asked for at
> > the time.
> >
> > The important information about why we want these patch is in 1/2.
> >
> > Richard Henderson (2):
> > x86: Use named address spaces in asm/percpu.h
> > x86: Enable named address spaces for percpu data
> >
> > arch/x86/include/asm/percpu.h | 147 ++++++++++++++++++++--------------
> > 1 file changed, 88 insertions(+), 59 deletions(-)
>
> Thanks for resurrecting this, Willy. I'd totally forgotten about it.
> The adjustments you made look fine.

Not all GCC versions seem to like this series:

In file included from arch/x86/mm/tlb.c:12:0:
arch/x86/mm/tlb.c: In function âswitch_mm_irqs_offâ:
./arch/x86/include/asm/mmu_context.h:210:28: internal compiler error: Segmentation fault
#define switch_mm_irqs_off switch_mm_irqs_off
arch/x86/mm/tlb.c:183:6: note: in expansion of macro âswitch_mm_irqs_offâ
void switch_mm_irqs_off(struct mm_struct *prev, struct mm_struct *next,
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.

gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)

Thanks,

Ingo