Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1472008

Re: [PATCH] x86, cpu: Fix node state for whether it contains CPU

From Tim Chen <tim.c.chen@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH] x86, cpu: Fix node state for whether it contains CPU
Date 2016-08-29 19:50 +0200
Message-ID <sbyR3-1Op-1@gated-at.bofh.it> (permalink)
References <s9PMm-17y-11@gated-at.bofh.it> <sbuX8-7SV-39@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, 2016-08-29 at 15:36 +0200, Peter Zijlstra wrote:
> On Wed, Aug 24, 2016 at 04:26:49PM -0700, Tim Chen wrote:
> > 
> > 
> > Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
> > ---
> >  arch/x86/kernel/smpboot.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
> > index d8f7d01..04c0574 100644
> > --- a/arch/x86/kernel/smpboot.c
> > +++ b/arch/x86/kernel/smpboot.c
> > @@ -259,6 +259,7 @@ static void notrace start_secondary(void *unused)
> >  	lock_vector_lock();
> >  	setup_vector_irq(smp_processor_id());
> >  	set_cpu_online(smp_processor_id(), true);
> > +	node_set_state(cpu_to_node(smp_processor_id()), N_CPU);
> >  	unlock_vector_lock();
> >  	cpu_set_state_online(smp_processor_id());
> >  	x86_platform.nmi_init();
> Would it not be easier to register the vmstat_notifier earlier, before
> SMP bringup? Because with this change, we need to go fix all
> architectures.

I think checking all nodes for online cpus when we init vmstat
is probably the more straightforward way to go. We can do this after
SMP bring up. I'll update the patch for that.

Thanks.

Tim

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Re: [PATCH] x86, cpu: Fix node state for whether it contains CPU Peter Zijlstra <peterz@infradead.org> - 2016-08-29 15:40 +0200
  Re: [PATCH] x86, cpu: Fix node state for whether it contains CPU Tim Chen <tim.c.chen@linux.intel.com> - 2016-08-29 19:50 +0200

csiph-web