From: Alex Shi <alex.shi@intel.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: tglx@linutronix.de, hpa@zytor.com, mingo@redhat.com,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
x86@kernel.org, asit.k.mallick@intel.com
Subject: Re: change last level cache alignment on x86?
Date: Fri, 02 Mar 2012 22:42:10 +0800 [thread overview]
Message-ID: <4F50DC42.3090300@intel.com> (raw)
In-Reply-To: <20120302081208.GA24504@elte.hu>
>> #ifdef CONFIG_X86_VSMP
>> #ifdef CONFIG_SMP
>> #define __cacheline_aligned_in_smp \
>> __attribute__((__aligned__(INTERNODE_CACHE_BYTES))) \
>> __page_aligned_data
>> #endif
>> #endif
>
> Note the #ifdef CONFIG_X86_VSMP - so the 128 bytes does not
> actually transform into __cacheline_aligned_in_smp.
Oh, sorry, I used a inappropriate example here, actually there are lot
places reference to this value, like in cscope show
INTERNODE_CACHE_BYTES usages:
1 13 arch/x86/include/asm/cache.h <<GLOBAL>>
#define INTERNODE_CACHE_BYTES (1 << INTERNODE_CACHE_SHIFT)
2 148 arch/x86/kernel/vmlinux.lds.S <<GLOBAL>>
READ_MOSTLY_DATA(INTERNODE_CACHE_BYTES)
3 190 arch/x86/kernel/vmlinux.lds.S <<GLOBAL>>
PERCPU_VADDR(INTERNODE_CACHE_BYTES, 0, :percpu)
4 285 arch/x86/kernel/vmlinux.lds.S <<GLOBAL>>
PERCPU_SECTION(INTERNODE_CACHE_BYTES)
5 48 arch/x86/mm/tlb.c <<GLOBAL>>
char pad[INTERNODE_CACHE_BYTES];
6 18 arch/x86/include/asm/cache.h <<__cacheline_aligned_in_smp>>
__attribute__((__aligned__(INTERNODE_CACHE_BYTES))) \
and also many references to INTERNODE_CACHE_SHIFT,
>
>> look at the following contents in Kconfig.cpu, I wondering if
>> it is possible to remove 'default "7" if NUMA' line. Then a
>> thin and fit cache alignment will be potential helpful on
>> performance. Anyone like to give some comments?
>
>> config X86_INTERNODE_CACHE_SHIFT
>> int
>> default "12" if X86_VSMP
>> - default "7" if NUMA
>> default X86_L1_CACHE_SHIFT
>
> Yes, removing that line would be fine I think - I think it was
> copied from the old L1 alignment of 128 bytes (which was a P4
> artifact when that CPU was the dominant platform - that's not
> been the case for a long time already).
Thanks! I will write a patch later.
>
> Could you please also do a before/after build of an x86
> defconfig with NUMA enabled and see what the alignments in the
> before/after System.map are?
So, with defconfig on x86_64, I saw much changes in System.map:
before patched after patched
...
000000000000b000 d tlb_vector_| 000000000000b000 d tlb_vector
000000000000b080 d cpu_loops_p| 000000000000b040 d cpu_loops_
...
>
> Thanks,
>
> Ingo
next prev parent reply other threads:[~2012-03-02 14:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-01 8:33 change last level cache alignment on x86? Alex,Shi
2012-03-02 7:30 ` Alex Shi
2012-03-02 8:12 ` Ingo Molnar
2012-03-02 14:42 ` Alex Shi [this message]
2012-03-02 15:25 ` Ingo Molnar
2012-03-03 11:30 ` Alex Shi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F50DC42.3090300@intel.com \
--to=alex.shi@intel.com \
--cc=asit.k.mallick@intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.