* [PATCH 2/2] x86: Move x86_cpu_to_apicid to the __read_mostly section
@ 2012-04-17 11:16 Vlad Zolotarov
0 siblings, 0 replies; 5+ messages in thread
From: Vlad Zolotarov @ 2012-04-17 11:16 UTC (permalink / raw)
To: linux-kernel, Thomas Gleixner, Ingo Molnar, H. Peter Anvin
Cc: Shai Fultheim (Shai@ScaleMP.com), ido
From: Shai Fultheim <shai@scalemp.com>
x86_cpu_to_apicid is only written to during initialization. Benchmarks
show that moving it to the __read_mostly section helps avoid false
sharing on large multiprocessing systems.
Signed-off-by: Shai Fultheim <shai@scalemp.com>
Signed-off-by: Vlad Zolotarov <vlad@scalemp.com>
---
arch/x86/include/asm/smp.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h
index 0434c40..b9d6c1e 100644
--- a/arch/x86/include/asm/smp.h
+++ b/arch/x86/include/asm/smp.h
@@ -53,7 +53,7 @@ static inline struct cpumask *cpu_llc_shared_mask(int cpu)
return per_cpu(cpu_llc_shared_map, cpu);
}
-DECLARE_EARLY_PER_CPU(u16, x86_cpu_to_apicid);
+DECLARE_EARLY_PER_CPU_READ_MOSTLY(u16, x86_cpu_to_apicid);
DECLARE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid);
#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86_32)
DECLARE_EARLY_PER_CPU(int, x86_cpu_to_logical_apicid);
--
1.7.7.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] x86: Move x86_cpu_to_apicid to the __read_mostly section
2012-05-07 13:41 ` Vlad Zolotarov
@ 2012-05-07 14:07 ` Ingo Molnar
0 siblings, 0 replies; 5+ messages in thread
From: Ingo Molnar @ 2012-05-07 14:07 UTC (permalink / raw)
To: Vlad Zolotarov
Cc: linux-kernel, alan, Shai Fultheim (Shai@ScaleMP.com),
H. Peter Anvin, Thomas Gleixner, Ingo Molnar
* Vlad Zolotarov <vlad@scalemp.com> wrote:
> On Monday, May 07, 2012 01:52:47 pm Ingo Molnar wrote:
> > * Vlad Zolotarov <vlad@scalemp.com> wrote:
> > > From: Shai Fultheim <shai@scalemp.com>
> > >
> > > x86_cpu_to_apicid is only written to during initialization. Benchmarks
> > > show that moving it to the __read_mostly section helps avoid false
> > > sharing on large multiprocessing systems.
> > >
> > > Signed-off-by: Shai Fultheim <shai@scalemp.com>
> > > Signed-off-by: Vlad Zolotarov <vlad@scalemp.com>
> > > ---
> > >
> > > arch/x86/include/asm/smp.h | 2 +-
> > > 1 files changed, 1 insertions(+), 1 deletions(-)
> > >
> > > diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h
> > > index 0434c40..b9d6c1e 100644
> > > --- a/arch/x86/include/asm/smp.h
> > > +++ b/arch/x86/include/asm/smp.h
> > > @@ -53,7 +53,7 @@ static inline struct cpumask *cpu_llc_shared_mask(int
> > > cpu)
> > >
> > > return per_cpu(cpu_llc_shared_map, cpu);
> > >
> > > }
> > >
> > > -DECLARE_EARLY_PER_CPU(u16, x86_cpu_to_apicid);
> > > +DECLARE_EARLY_PER_CPU_READ_MOSTLY(u16, x86_cpu_to_apicid);
> > >
> > > DECLARE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid);
> > > #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86_32)
> > > DECLARE_EARLY_PER_CPU(int, x86_cpu_to_logical_apicid);
> >
> > Looks like all of the surrounding fields are read mostly as
> > well, only initialized very rarely, during cpu init?
>
> U r right. At least x86_bios_cpu_apicid is read mostly as
> well. I'll fix and respin.
Thanks.
> Did u have a chance to look at the other "__read_mostly" patch for fs/buffer.c
> I've sent?
Haven't been involved with fs/buffer.c for some time, please
send it to the relevant maintainer:
$ scripts/get_maintainer.pl -f fs/buffer.c
Alexander Viro <viro@zeniv.linux.org.uk> (maintainer:FILESYSTEMS (VFS...)
linux-fsdevel@vger.kernel.org (open list:FILESYSTEMS (VFS...)
linux-kernel@vger.kernel.org (open list)
Thanks,
Ingo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] x86: Move x86_cpu_to_apicid to the __read_mostly section
2012-05-07 10:52 ` Ingo Molnar
@ 2012-05-07 13:41 ` Vlad Zolotarov
2012-05-07 14:07 ` Ingo Molnar
0 siblings, 1 reply; 5+ messages in thread
From: Vlad Zolotarov @ 2012-05-07 13:41 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, alan, Shai Fultheim (Shai@ScaleMP.com),
H. Peter Anvin, Thomas Gleixner, Ingo Molnar
On Monday, May 07, 2012 01:52:47 pm Ingo Molnar wrote:
> * Vlad Zolotarov <vlad@scalemp.com> wrote:
> > From: Shai Fultheim <shai@scalemp.com>
> >
> > x86_cpu_to_apicid is only written to during initialization. Benchmarks
> > show that moving it to the __read_mostly section helps avoid false
> > sharing on large multiprocessing systems.
> >
> > Signed-off-by: Shai Fultheim <shai@scalemp.com>
> > Signed-off-by: Vlad Zolotarov <vlad@scalemp.com>
> > ---
> >
> > arch/x86/include/asm/smp.h | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h
> > index 0434c40..b9d6c1e 100644
> > --- a/arch/x86/include/asm/smp.h
> > +++ b/arch/x86/include/asm/smp.h
> > @@ -53,7 +53,7 @@ static inline struct cpumask *cpu_llc_shared_mask(int
> > cpu)
> >
> > return per_cpu(cpu_llc_shared_map, cpu);
> >
> > }
> >
> > -DECLARE_EARLY_PER_CPU(u16, x86_cpu_to_apicid);
> > +DECLARE_EARLY_PER_CPU_READ_MOSTLY(u16, x86_cpu_to_apicid);
> >
> > DECLARE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid);
> > #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86_32)
> > DECLARE_EARLY_PER_CPU(int, x86_cpu_to_logical_apicid);
>
> Looks like all of the surrounding fields are read mostly as
> well, only initialized very rarely, during cpu init?
U r right. At least x86_bios_cpu_apicid is read mostly as well. I'll fix and
respin.
Did u have a chance to look at the other "__read_mostly" patch for fs/buffer.c
I've sent?
thanks,
vlad
>
> Thanks,
>
> Ingo
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] x86: Move x86_cpu_to_apicid to the __read_mostly section
2012-04-24 11:29 Vlad Zolotarov
@ 2012-05-07 10:52 ` Ingo Molnar
2012-05-07 13:41 ` Vlad Zolotarov
0 siblings, 1 reply; 5+ messages in thread
From: Ingo Molnar @ 2012-05-07 10:52 UTC (permalink / raw)
To: Vlad Zolotarov
Cc: linux-kernel, alan, Shai Fultheim (Shai@ScaleMP.com),
H. Peter Anvin, Thomas Gleixner, Ingo Molnar
* Vlad Zolotarov <vlad@scalemp.com> wrote:
> From: Shai Fultheim <shai@scalemp.com>
>
> x86_cpu_to_apicid is only written to during initialization. Benchmarks
> show that moving it to the __read_mostly section helps avoid false
> sharing on large multiprocessing systems.
>
> Signed-off-by: Shai Fultheim <shai@scalemp.com>
> Signed-off-by: Vlad Zolotarov <vlad@scalemp.com>
> ---
> arch/x86/include/asm/smp.h | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h
> index 0434c40..b9d6c1e 100644
> --- a/arch/x86/include/asm/smp.h
> +++ b/arch/x86/include/asm/smp.h
> @@ -53,7 +53,7 @@ static inline struct cpumask *cpu_llc_shared_mask(int cpu)
> return per_cpu(cpu_llc_shared_map, cpu);
> }
>
> -DECLARE_EARLY_PER_CPU(u16, x86_cpu_to_apicid);
> +DECLARE_EARLY_PER_CPU_READ_MOSTLY(u16, x86_cpu_to_apicid);
> DECLARE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid);
> #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86_32)
> DECLARE_EARLY_PER_CPU(int, x86_cpu_to_logical_apicid);
Looks like all of the surrounding fields are read mostly as
well, only initialized very rarely, during cpu init?
Thanks,
Ingo
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] x86: Move x86_cpu_to_apicid to the __read_mostly section
@ 2012-04-24 11:29 Vlad Zolotarov
2012-05-07 10:52 ` Ingo Molnar
0 siblings, 1 reply; 5+ messages in thread
From: Vlad Zolotarov @ 2012-04-24 11:29 UTC (permalink / raw)
To: linux-kernel
Cc: alan, Shai Fultheim (Shai@ScaleMP.com),
H. Peter Anvin, Thomas Gleixner, Ingo Molnar
From: Shai Fultheim <shai@scalemp.com>
x86_cpu_to_apicid is only written to during initialization. Benchmarks
show that moving it to the __read_mostly section helps avoid false
sharing on large multiprocessing systems.
Signed-off-by: Shai Fultheim <shai@scalemp.com>
Signed-off-by: Vlad Zolotarov <vlad@scalemp.com>
---
arch/x86/include/asm/smp.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h
index 0434c40..b9d6c1e 100644
--- a/arch/x86/include/asm/smp.h
+++ b/arch/x86/include/asm/smp.h
@@ -53,7 +53,7 @@ static inline struct cpumask *cpu_llc_shared_mask(int cpu)
return per_cpu(cpu_llc_shared_map, cpu);
}
-DECLARE_EARLY_PER_CPU(u16, x86_cpu_to_apicid);
+DECLARE_EARLY_PER_CPU_READ_MOSTLY(u16, x86_cpu_to_apicid);
DECLARE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid);
#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86_32)
DECLARE_EARLY_PER_CPU(int, x86_cpu_to_logical_apicid);
--
1.7.7.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-05-07 14:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-17 11:16 [PATCH 2/2] x86: Move x86_cpu_to_apicid to the __read_mostly section Vlad Zolotarov
2012-04-24 11:29 Vlad Zolotarov
2012-05-07 10:52 ` Ingo Molnar
2012-05-07 13:41 ` Vlad Zolotarov
2012-05-07 14:07 ` Ingo Molnar
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.