From: Shaohua Li <shaohua.li@intel.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"mingo@redhat.com" <mingo@redhat.com>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"hpa@linux.intel.com" <hpa@linux.intel.com>
Subject: Re: [tip:x86/mm] percpu: Introduce a read-mostly percpu API
Date: Thu, 21 Oct 2010 14:17:01 +0800 [thread overview]
Message-ID: <20101021061701.GA17054@sli10-conroe.sh.intel.com> (raw)
In-Reply-To: <4CBFD92B.5090503@zytor.com>
On Thu, Oct 21, 2010 at 02:09:47PM +0800, H. Peter Anvin wrote:
> On 10/20/2010 11:07 PM, Eric Dumazet wrote:
> > Le mercredi 20 octobre 2010 à 22:54 -0700, H. Peter Anvin a écrit :
> >
> >> L1_CACHE_BYTES is completely pointless, since if there is sharing to
> >> worry about *at all*, it's probably at the L2 or L3 cache levels.
> >>
> >
> > I see, and we dont have better way to express this hint/requirement than
> > using PAGE_SIZE or INTERNODE_CACHE_SHIFT ?
> >
> > In your patch you force a PAGE_SIZE alignement *before*
> > *(.data..percpu..page_aligned)
> >
> > If this alignment is really needed, this should be part of another
> > patch, since this fixes a previous bug in 2.6.36 ?
> >
>
> It was part of Shaohua's patch... I don't know if it does anything
> useful, but it also doesn't hurt.
This isn't a previous bug. see
#define DECLARE_PER_CPU_PAGE_ALIGNED(type, name) \
DECLARE_PER_CPU_SECTION(type, name, "..page_aligned") \
__aligned(PAGE_SIZE)
the ..page_aligned is already page aligned. I add it is because it can make
the .readmostly section guarantee to have no cache false sharing, because
I add the . = ALIGN(PAGE_SIZE); before .readmostly section, and .page_aligned
follows, but for sure this wates some memory.
next prev parent reply other threads:[~2010-10-21 6:17 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-20 3:07 [PATCH 1/2]percpu: introduce read mostly " Shaohua Li
2010-10-20 5:18 ` Eric Dumazet
2010-10-20 6:00 ` H. Peter Anvin
2010-10-20 7:35 ` Andi Kleen
2010-10-20 7:53 ` Eric Dumazet
2010-10-20 21:38 ` H. Peter Anvin
2010-10-20 21:42 ` H. Peter Anvin
2010-10-20 21:33 ` H. Peter Anvin
2010-10-20 23:06 ` [tip:x86/mm] percpu: Introduce a read-mostly " tip-bot for Shaohua Li
2010-10-21 1:38 ` Shaohua Li
2010-10-21 2:53 ` H. Peter Anvin
2010-10-21 5:33 ` Eric Dumazet
2010-10-21 5:54 ` H. Peter Anvin
2010-10-21 6:07 ` Eric Dumazet
2010-10-21 6:09 ` H. Peter Anvin
2010-10-21 6:17 ` Shaohua Li [this message]
2010-10-21 6:48 ` Eric Dumazet
2010-10-21 6:54 ` H. Peter Anvin
2010-10-21 6:10 ` H. Peter Anvin
2010-10-21 7:40 ` [tip:x86/mm] x86-32, percpu: Correct the ordering of the percpu readmostly section tip-bot for H. Peter Anvin
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=20101021061701.GA17054@sli10-conroe.sh.intel.com \
--to=shaohua.li@intel.com \
--cc=eric.dumazet@gmail.com \
--cc=hpa@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome