From: Dario Faggioli <dfaggioli@suse.com>
To: George Dunlap <dunlapg@umich.edu>, Juergen Gross <jgross@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [Xen-devel] [PATCH 1/3] xen/sched: populate cpupool0 only after all cpus are up
Date: Wed, 14 Aug 2019 18:58:56 +0200 [thread overview]
Message-ID: <5996e059f0babfad9f79c1bf535f80dcc68cd14e.camel@suse.com> (raw)
In-Reply-To: <CAFLBxZa=ymiPSQP+Z8_3+6UFnt1eu15Wv5Km-xpShwB=Mpx0MA@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 2161 bytes --]
On Wed, 2019-08-14 at 17:15 +0100, George Dunlap wrote:
> On Fri, Aug 2, 2019 at 2:08 PM Juergen Gross <jgross@suse.com> wrote:
> > --- a/xen/common/cpupool.c
> > +++ b/xen/common/cpupool.c
> > @@ -762,18 +762,28 @@ static struct notifier_block cpu_nfb = {
> > .notifier_call = cpu_callback
> > };
> >
> > -static int __init cpupool_presmp_init(void)
> > +static int __init cpupool_init(void)
> > {
> > + unsigned int cpu;
> > int err;
> > - void *cpu = (void *)(long)smp_processor_id();
> > +
> > cpupool0 = cpupool_create(0, 0, &err);
> > BUG_ON(cpupool0 == NULL);
> > cpupool_put(cpupool0);
> > - cpu_callback(&cpu_nfb, CPU_ONLINE, cpu);
> > register_cpu_notifier(&cpu_nfb);
> > +
> > + spin_lock(&cpupool_lock);
> > +
> > + cpumask_copy(&cpupool_free_cpus, &cpu_online_map);
> > +
> > + for_each_cpu ( cpu, &cpupool_free_cpus )
> > + cpupool_assign_cpu_locked(cpupool0, cpu);
> > +
> > + spin_unlock(&cpupool_lock);
>
> Just to make sure I understand what's happening here --
> cpu_callback()
> now won't get called with CPU_ONLINE early in the boot process; but
> it
> will still be called with CPU_ONLINE in other circumstances (e.g.,
> hot-plug / suspend / whatever)?
>
Exactly.
It is not used for resume (from suspend) any longer, since commit
6870ea9d1fad ("xen/cpupool: simplify suspend/resume handling).
But it is used for putting the various CPUs in Pool-0, as they come-up,
during boot.
This patch remove the "hack" of calling it directly, during cpupool
initialization, for the BSP.
> Sorry that's an overly-basic question; I don't have a good picture
> for
> the cpu state machine.
>
Well, I used to... I tried to quickly double check things, and what I
said above should be still valid, even after the latest changes (or so
I hope :-) ).
Regards
--
Dario Faggioli, Ph.D
http://about.me/dario.faggioli
Virtualization Software Engineer
SUSE Labs, SUSE https://www.suse.com/
-------------------------------------------------------------------
<<This happens because _I_ choose it to happen!>> (Raistlin Majere)
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 157 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2019-08-14 16:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-02 13:07 [Xen-devel] [PATCH 0/3] xen/sched: use new idle scheduler for free cpus Juergen Gross
2019-08-02 13:07 ` [Xen-devel] [PATCH 1/3] xen/sched: populate cpupool0 only after all cpus are up Juergen Gross
2019-08-13 16:07 ` Dario Faggioli
2019-08-26 8:35 ` Juergen Gross
2019-08-14 16:15 ` George Dunlap
2019-08-14 16:58 ` Dario Faggioli [this message]
2019-08-02 13:07 ` [Xen-devel] [PATCH 2/3] xen/sched: remove cpu from pool0 before removing it Juergen Gross
2019-08-13 17:11 ` Dario Faggioli
2019-08-26 8:37 ` Juergen Gross
2019-08-02 13:07 ` [Xen-devel] [PATCH 3/3] xen/sched: add minimalistic idle scheduler for free cpus Juergen Gross
2019-08-13 17:07 ` Dario Faggioli
2019-08-09 9:47 ` [Xen-devel] [PATCH 0/3] xen/sched: use new " Juergen Gross
2019-08-09 10:35 ` Dario Faggioli
2019-08-13 15:51 ` Dario Faggioli
2019-08-26 8:34 ` Juergen Gross
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=5996e059f0babfad9f79c1bf535f80dcc68cd14e.camel@suse.com \
--to=dfaggioli@suse.com \
--cc=dunlapg@umich.edu \
--cc=jgross@suse.com \
--cc=xen-devel@lists.xenproject.org \
/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).