From: Eric Dumazet <eric.dumazet@gmail.com>
To: Shaohua Li <shaohua.li@intel.com>
Cc: lkml <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
Andi Kleen <andi@firstfloor.org>, "hpa@zytor.com" <hpa@zytor.com>
Subject: Re: [RFC 4/4]x86: avoid tlbstate lock if no enough cpus
Date: Wed, 03 Nov 2010 08:31:26 +0100 [thread overview]
Message-ID: <1288769486.2467.690.camel@edumazet-laptop> (raw)
In-Reply-To: <1288769123.2467.681.camel@edumazet-laptop>
Le mercredi 03 novembre 2010 à 08:25 +0100, Eric Dumazet a écrit :
> Le mercredi 03 novembre 2010 à 15:19 +0800, Shaohua Li a écrit :
> > On Wed, 2010-11-03 at 15:12 +0800, Eric Dumazet wrote:
> > > Le mercredi 03 novembre 2010 à 15:06 +0800, Shaohua Li a écrit :
> > > > just don't want to include the non-present cpus here. I wonder why we
> > > > haven't a variable to record online cpu number.
> > >
> > > What prevents a 256 cpus machine, to have 8 online cpus that all use the
> > > same TLB vector ?
> > >
> > > (Max 32 vectors, so 8 cpus share each vector, settled at boot time)
> > >
> > > Forget about 'online', and think 'possible' ;)
> > Hmm, the spread vectors to node already merged, how could the 8 cpus
> > share a vector?
> >
>
> You boot a machine with 256 cpu.
>
> They are online and very well.
>
> Each vector is shared by at least 8 cpus, because 256/32 = 8. OK ?
>
> Now you off-line 256-8 cpus, because you have HOTPLUG capability in your
> kernel and you have some policy to bring them up later if needed.
>
> What happens ? Do you rebalance TLB vectors to make sure each cpu has
> its own vector ?
>
>
It seems you do that since commit 932967202182743 in
calculate_tlb_offset()
So just add in this function some logic to tell if each tlb vector is
used by one or several cpu.
We can avoid the lock for each TLB vector used by exactly one cpu.
next prev parent reply other threads:[~2010-11-03 7:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-03 6:44 Shaohua Li
2010-11-03 6:59 ` Eric Dumazet
2010-11-03 7:06 ` Shaohua Li
2010-11-03 7:12 ` Eric Dumazet
2010-11-03 7:19 ` Shaohua Li
2010-11-03 7:25 ` Eric Dumazet
2010-11-03 7:31 ` Eric Dumazet [this message]
[not found] ` <1288773716.23014.124.camel@sli10-conroe>
2010-11-03 9:08 ` Eric Dumazet
2010-11-04 5:21 ` Shaohua Li
2010-11-04 5:42 ` Eric Dumazet
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=1288769486.2467.690.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=andi@firstfloor.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=shaohua.li@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®