From: "H. Peter Anvin" <hpa@zytor.com>
To: Shaohua Li <shaohua.li@intel.com>, Andi Kleen <andi@firstfloor.org>
Cc: lkml <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
"Chen, Tim C" <tim.c.chen@intel.com>
Subject: Re: [patch]x86: spread tlb flush vector between nodes
Date: Mon, 18 Oct 2010 23:21:48 -0700 [thread overview]
Message-ID: <6dd05e19-05ef-48e4-b42d-d18c913fa4d7@email.android.com> (raw)
In-Reply-To: <1287466757.29515.2.camel@sli10-conroe.sh.intel.com>
Technically, it is way too late for anything new in this merge window, but we can try to make a reasonable assessment of the risk since the merge window got delayed. However, this close to the merge window you cannot just expect to be merged even if the patch itself is OK.
"Shaohua Li" <shaohua.li@intel.com> wrote:
>On Wed, 2010-10-13 at 16:39 +0800, Shaohua Li wrote:
>> On Wed, 2010-10-13 at 16:16 +0800, Andi Kleen wrote:
>> > On Wed, Oct 13, 2010 at 03:41:38PM +0800, Shaohua Li wrote:
>> >
>> > Hi Shaohua,
>> >
>> > > Currently flush tlb vector allocation is based on below equation:
>> > > sender = smp_processor_id() % 8
>> > > This isn't optimal, CPUs from different node can have the same vector, this
>> > > causes a lot of lock contention. Instead, we can assign the same vectors to
>> > > CPUs from the same node, while different node has different vectors. This has
>> > > below advantages:
>> > > a. if there is lock contention, the lock contention is between CPUs from one
>> > > node. This should be much cheaper than the contention between nodes.
>> > > b. completely avoid lock contention between nodes. This especially benefits
>> > > kswapd, which is the biggest user of tlb flush, since kswapd sets its affinity
>> > > to specific node.
>> >
>> > The original scheme with 8 vectors was designed when Linux didn't have
>> > per CPU interrupt numbers yet, and interrupts vectors were a scarce resource.
>> >
>> > Now that we have per CPU interrupts and there is no immediate danger
>> > of running out I think it's better to use more than 8 vectors for the TLB
>> > flushes.
>> >
>> > Perhaps could use 32 vectors or so and give each node on a 8S
>> > system 4 slots and on a 4 node system 8 slots?
>> Haven't too much idea. Before we have per CPU interrupts, muti vector
>> msi-x isn't widely deployed. Thought we need data if this is really
>> required.
>looks there are still some overhead with total 8 vectors in a big
>machine. I'll try the 32 vectors as you suggested. I'll send separate
>patches out to address the 32 vectors issue. Can we merge this patch
>first?
>
>Thanks,
>Shaohua
>
--
Sent from my mobile phone. Please pardon any lack of formatting.
next prev parent reply other threads:[~2010-10-19 6:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-13 7:41 Shaohua Li
2010-10-13 8:16 ` Andi Kleen
2010-10-13 8:39 ` Shaohua Li
2010-10-13 11:19 ` Ingo Molnar
2010-10-19 5:39 ` Shaohua Li
2010-10-19 6:21 ` H. Peter Anvin [this message]
2010-10-19 8:44 ` Ingo Molnar
2010-10-19 8:55 ` Shaohua Li
2010-10-19 10:37 ` Ingo Molnar
2010-10-19 13:28 ` Shaohua Li
2010-10-19 13:34 ` Andi Kleen
2010-10-20 1:13 ` Shaohua Li
2010-10-20 2:39 ` 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=6dd05e19-05ef-48e4-b42d-d18c913fa4d7@email.android.com \
--to=hpa@zytor.com \
--cc=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=shaohua.li@intel.com \
--cc=tim.c.chen@intel.com \
/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
all inboxes | Powered by JetHome®