linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ofer Levi(SW)" <oferle@mellanox.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: "rusty@rustcorp.com.au" <rusty@rustcorp.com.au>,
	"vatsa@in.ibm.com" <vatsa@in.ibm.com>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"Vineet.Gupta1@synopsys.com" <Vineet.Gupta1@synopsys.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: hotplug support for arch/arc/plat-eznps platform
Date: Tue, 8 Aug 2017 06:49:39 +0000	[thread overview]
Message-ID: <VI1PR0501MB21100A7A5B234E07831789DCB28A0@VI1PR0501MB2110.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <20170807151020.h2u45tx64ccee64a@hirez.programming.kicks-ass.net>


> On Monday, August 7, 2017 6:10 PM +0000, Ofer Levi(SW) wrote:
> 
> On Mon, Aug 07, 2017 at 01:41:38PM +0000, Ofer Levi(SW) wrote:
> > > You've failed to explain why you think hotplug should be a
> > > performance critical path.
> > 1. hotplug bring up of 4K cpus takes 40 minutes.  Way too much for any
> user.
> > 2. plat-eznps is a network processor, where bring up time is sensitive.
> 
> But who is doing actual hotplug? Why would you ever unplug or plug a CPU in
> a time critical situation?

The idea behind implementing hotplug for this arch is to shorten time to traffic processing. 
This way instead of waiting ~5 min for all cpus to boot, application running on cpu 0 will 
Loop booting other cpus and assigning  the traffic processing application to it. 
Outgoing traffic will build up until all cpus are up and running full traffic rate.
This method allow for traffic processing to start after ~20 sec instead of the 5 min.

> 
> > > I'm also not seeing how it would be different from boot; you'd be
> > > looking at a similar cost for SMP bringup.
> > bring up time of 4k cpus during kernel boot takes 4.5 minutes.
> > The function in question is performed only when smp init was performed.
> > If I understand correctly, whatever this function is doing is
> > performed after all cpus were brought up during kernel boot.
> 
> Doesn't make sense. If you look at smp_init() boot brings up the CPUs one at
> a time.
> 
> So how can boot be different than hot-pugging them?

Please have a look at following code kernel/sched/core.c, sched_cpu_activate() :

	if (sched_smp_initialized) {
		sched_domains_numa_masks_set(cpu);
		cpuset_cpu_active();
	}
The cpuset_cpu_active call eventually leads to the function in question partition_sched_domains()
When cold-booting cpus the sched_smp_initialized flag is false and therefore partition_sched_domains is not executing.

This leads me back to my questions


Thanks.

  reply	other threads:[~2017-08-08  6:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-06  5:53 hotplug support for arch/arc/plat-eznps platform Ofer Levi(SW)
2017-08-07  8:33 ` Peter Zijlstra
2017-08-07 13:41   ` Ofer Levi(SW)
2017-08-07 15:10     ` Peter Zijlstra
2017-08-08  6:49       ` Ofer Levi(SW) [this message]
2017-08-08 10:16         ` Peter Zijlstra
2017-08-09 15:19           ` Ofer Levi(SW)
2017-08-09 15:34             ` Peter Zijlstra
2017-08-10  7:40               ` Ofer Levi(SW)
2017-08-10  9:19                 ` Peter Zijlstra
2017-08-10 11:51                   ` Ofer Levi(SW)
2017-08-10 15:45                   ` Peter Zijlstra
2017-08-14  7:54                     ` Ofer Levi(SW)

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=VI1PR0501MB21100A7A5B234E07831789DCB28A0@VI1PR0501MB2110.eurprd05.prod.outlook.com \
    --to=oferle@mellanox.com \
    --cc=Vineet.Gupta1@synopsys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rusty@rustcorp.com.au \
    --cc=vatsa@in.ibm.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;
as well as URLs for NNTP newsgroup(s).