* Re: [patch 3/3]use new macros for x86 percpu readmostly section
[not found] <1291255350.12777.117.camel@sli10-conroe>
@ 2010-12-09 22:32 ` Andrew Morton
2010-12-10 0:21 ` Shaohua Li
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2010-12-09 22:32 UTC (permalink / raw)
To: Shaohua Li; +Cc: lkml, hpa@zytor.com, sam, eric.dumazet, linux-arch
On Thu, 02 Dec 2010 10:02:30 +0800
Shaohua Li <shaohua.li@intel.com> wrote:
> Use the new macros to correctly align percpu readmostly data.
>
> Signed-off-by: Shaohua Li <shaohua.li@intel.com>
> ---
> arch/x86/kernel/vmlinux.lds.S | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> Index: linux/arch/x86/kernel/vmlinux.lds.S
> ===================================================================
> --- linux.orig/arch/x86/kernel/vmlinux.lds.S 2010-12-02 09:48:44.000000000 +0800
> +++ linux/arch/x86/kernel/vmlinux.lds.S 2010-12-02 09:54:24.000000000 +0800
> @@ -226,7 +226,7 @@ SECTIONS
> * output PHDR, so the next output section - .init.text - should
> * start another segment - init.
> */
> - PERCPU_VADDR(0, :percpu)
> + PERCPU_VADDR_CACHEALIGNED(0, :percpu, INTERNODE_CACHE_BYTES)
> #endif
>
> INIT_TEXT_SECTION(PAGE_SIZE)
> @@ -301,7 +301,7 @@ SECTIONS
> }
>
> #if !defined(CONFIG_X86_64) || !defined(CONFIG_SMP)
> - PERCPU(THREAD_SIZE)
> + PERCPU_CACHEALIGNED(THREAD_SIZE, INTERNODE_CACHE_BYTES)
> #endif
>
> . = ALIGN(PAGE_SIZE);
>
So what is the situation now with all other architectures? Should they
be changed to correctly align their read-mostly percpu areas?
If so, what should the arch maintainers do to achieve this?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch 3/3]use new macros for x86 percpu readmostly section
2010-12-09 22:32 ` [patch 3/3]use new macros for x86 percpu readmostly section Andrew Morton
@ 2010-12-10 0:21 ` Shaohua Li
2010-12-10 0:21 ` Shaohua Li
0 siblings, 1 reply; 3+ messages in thread
From: Shaohua Li @ 2010-12-10 0:21 UTC (permalink / raw)
To: Andrew Morton
Cc: lkml, hpa@zytor.com, sam@ravnborg.org, eric.dumazet@gmail.com,
linux-arch@vger.kernel.org
On Fri, 2010-12-10 at 06:32 +0800, Andrew Morton wrote:
> On Thu, 02 Dec 2010 10:02:30 +0800
> Shaohua Li <shaohua.li@intel.com> wrote:
>
> > Use the new macros to correctly align percpu readmostly data.
> >
> > Signed-off-by: Shaohua Li <shaohua.li@intel.com>
> > ---
> > arch/x86/kernel/vmlinux.lds.S | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > Index: linux/arch/x86/kernel/vmlinux.lds.S
> > ===================================================================
> > --- linux.orig/arch/x86/kernel/vmlinux.lds.S 2010-12-02 09:48:44.000000000 +0800
> > +++ linux/arch/x86/kernel/vmlinux.lds.S 2010-12-02 09:54:24.000000000 +0800
> > @@ -226,7 +226,7 @@ SECTIONS
> > * output PHDR, so the next output section - .init.text - should
> > * start another segment - init.
> > */
> > - PERCPU_VADDR(0, :percpu)
> > + PERCPU_VADDR_CACHEALIGNED(0, :percpu, INTERNODE_CACHE_BYTES)
> > #endif
> >
> > INIT_TEXT_SECTION(PAGE_SIZE)
> > @@ -301,7 +301,7 @@ SECTIONS
> > }
> >
> > #if !defined(CONFIG_X86_64) || !defined(CONFIG_SMP)
> > - PERCPU(THREAD_SIZE)
> > + PERCPU_CACHEALIGNED(THREAD_SIZE, INTERNODE_CACHE_BYTES)
> > #endif
> >
> > . = ALIGN(PAGE_SIZE);
> >
>
> So what is the situation now with all other architectures? Should they
> be changed to correctly align their read-mostly percpu areas?
>
> If so, what should the arch maintainers do to achieve this?
Yes, other arch should use new macro too with correct cache alignment
(similar like the alignment for read-mostly section). But currently only
x86 has read-mostly percpu data.
Thanks,
Shaohua
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch 3/3]use new macros for x86 percpu readmostly section
2010-12-10 0:21 ` Shaohua Li
@ 2010-12-10 0:21 ` Shaohua Li
0 siblings, 0 replies; 3+ messages in thread
From: Shaohua Li @ 2010-12-10 0:21 UTC (permalink / raw)
To: Andrew Morton
Cc: lkml, hpa@zytor.com, sam@ravnborg.org, eric.dumazet@gmail.com,
linux-arch@vger.kernel.org
On Fri, 2010-12-10 at 06:32 +0800, Andrew Morton wrote:
> On Thu, 02 Dec 2010 10:02:30 +0800
> Shaohua Li <shaohua.li@intel.com> wrote:
>
> > Use the new macros to correctly align percpu readmostly data.
> >
> > Signed-off-by: Shaohua Li <shaohua.li@intel.com>
> > ---
> > arch/x86/kernel/vmlinux.lds.S | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > Index: linux/arch/x86/kernel/vmlinux.lds.S
> > ===================================================================
> > --- linux.orig/arch/x86/kernel/vmlinux.lds.S 2010-12-02 09:48:44.000000000 +0800
> > +++ linux/arch/x86/kernel/vmlinux.lds.S 2010-12-02 09:54:24.000000000 +0800
> > @@ -226,7 +226,7 @@ SECTIONS
> > * output PHDR, so the next output section - .init.text - should
> > * start another segment - init.
> > */
> > - PERCPU_VADDR(0, :percpu)
> > + PERCPU_VADDR_CACHEALIGNED(0, :percpu, INTERNODE_CACHE_BYTES)
> > #endif
> >
> > INIT_TEXT_SECTION(PAGE_SIZE)
> > @@ -301,7 +301,7 @@ SECTIONS
> > }
> >
> > #if !defined(CONFIG_X86_64) || !defined(CONFIG_SMP)
> > - PERCPU(THREAD_SIZE)
> > + PERCPU_CACHEALIGNED(THREAD_SIZE, INTERNODE_CACHE_BYTES)
> > #endif
> >
> > . = ALIGN(PAGE_SIZE);
> >
>
> So what is the situation now with all other architectures? Should they
> be changed to correctly align their read-mostly percpu areas?
>
> If so, what should the arch maintainers do to achieve this?
Yes, other arch should use new macro too with correct cache alignment
(similar like the alignment for read-mostly section). But currently only
x86 has read-mostly percpu data.
Thanks,
Shaohua
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-12-10 0:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1291255350.12777.117.camel@sli10-conroe>
2010-12-09 22:32 ` [patch 3/3]use new macros for x86 percpu readmostly section Andrew Morton
2010-12-10 0:21 ` Shaohua Li
2010-12-10 0:21 ` Shaohua Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox