[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101013111913.GA32131@elte.hu>
Date: Wed, 13 Oct 2010 13:19:13 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Shaohua Li <shaohua.li@...el.com>
Cc: Andi Kleen <andi@...stfloor.org>,
lkml <linux-kernel@...r.kernel.org>,
"hpa@...or.com" <hpa@...or.com>,
"Chen, Tim C" <tim.c.chen@...el.com>
Subject: Re: [patch]x86: spread tlb flush vector between nodes
* Shaohua Li <shaohua.li@...el.com> 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:
> > > +
> > > +static int tlb_cpuhp_notify(struct notifier_block *n,
> > > + unsigned long action, void *hcpu)
> > > +{
> > > + switch (action & 0xf) {
> > > + case CPU_ONLINE:
> > > + case CPU_DEAD:
> > > + calculate_tlb_offset();
> > > + }
> > > + return NOTIFY_OK;
> >
> > I don't think we really need the complexity of a notifier here.
> > In most x86 setups possible is very similar to online.
> >
> > So I would suggest simply to compute a static mapping at boot
> > and simplify the code.
> >
> > In theory there is a slight danger of node<->CPU numbers
> > changing with consecutive hot plug actions, but right now
> > this should not happen anyways and it would be unlikely
> > later.
>
> yes, it's unlikely. could we get the node info for a CPU before it's
> hotplugged? Anyway, this doesn't take overhead.
It would be rather stupid to throw away the fairly simple hotplug-aware
code you wrote and replace it with some lame boot-time calculated
mapping just because currently it's considered rare.
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists