Xen-Devel Archive on lore.kernel.org
 help / color / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Dario Faggioli <dfaggioli@suse.com>, xen-devel@lists.xenproject.org
Cc: Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Tim Deegan <tim@xen.org>, Julien Grall <julien.grall@arm.com>,
	Jan Beulich <jbeulich@suse.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>
Subject: Re: [Xen-devel] [PATCH v3 2/4] xen/sched: remove cpu from pool0 before removing it
Date: Sat, 14 Sep 2019 07:04:07 +0200
Message-ID: <f96be1bb-9881-a300-4f4d-24c3c2fdb7bf@suse.com> (raw)
In-Reply-To: <bdf39183da171d3780318f3c50818906a6a4b487.camel@suse.com>

On 13.09.19 19:27, Dario Faggioli wrote:
> On Mon, 2019-09-09 at 11:33 +0200, Juergen Gross wrote:
>> Today a cpu which is removed from the system is taken directly from
>> Pool0 to the offline state. This will conflict with the new idle
>> scheduler, so remove it from Pool0 first. Additionally accept
>> removing
>> a free cpu instead of requiring it to be in Pool0.
>>
>> For the resume failed case we need to call the scheduler code for
>> that
>> situation after the cpupool handling, so move the scheduler code into
>> a function and call it from cpupool_cpu_remove_forced() and remove
>> the
>> CPU_RESUME_FAILED case from cpu_schedule_callback().
>>
>> Note that we are calling now schedule_cpu_switch() in stop_machine
>> context so we need to switch from spinlock_irq to spinlock_irqsave.
>>
> So, I was looking at this patch, and while doing that, also trying it
> out.
> 
> I've done the following:
> 
> # echo 0 > /sys/devices/system/xen_cpu/xen_cpu7/online
> 
> And CPU 7 went offline, and was listed among the free CPUs:
> 
> (XEN) Online Cpus: 0-6
> (XEN) Free Cpus: 7
> (XEN) Cpupool 0:
> (XEN) Cpus: 0-6
> (XEN) Scheduler: SMP Credit Scheduler rev2 (credit2)
> (XEN) Active queues: 1
> (XEN) 	default-weight     = 256
> (XEN) Runqueue 0:
> (XEN) 	ncpus              = 7
> (XEN) 	cpus               = 0-6
> (XEN) 	max_weight         = 256
> (XEN) 	pick_bias          = 1
> (XEN) 	instload           = 1
> (XEN) 	aveload            = 3992 (~1%)
> (XEN) 	idlers: 0000006f
> (XEN) 	tickled: 00000000
> (XEN) 	fully idle cores: 0000004f
> 
> Then, I did:
> 
> # echo 1 > /sys/devices/system/xen_cpu/xen_cpu7/online
> 
> And again it appear to have worked, i.e., the CPU is back online and in
> Pool-0:
> 
> (XEN) Online Cpus: 0-7
> (XEN) Cpupool 0:
> (XEN) Cpus: 0-7
> (XEN) Scheduler: SMP Credit Scheduler rev2 (credit2)
> (XEN) Active queues: 1
> (XEN) 	default-weight     = 256
> (XEN) Runqueue 0:
> (XEN) 	ncpus              = 8
> (XEN) 	cpus               = 0-7
> (XEN) 	max_weight         = 256
> (XEN) 	pick_bias          = 1
> (XEN) 	instload           = 2
> (XEN) 	aveload            = 271474 (~103%)
> (XEN) 	idlers: 000000af
> (XEN) 	tickled: 00000000
> (XEN) 	fully idle cores: 0000008f
> 
> Then I did:
> 
> # echo 0 > /sys/devices/system/xen_cpu/xen_cpu7/online
> 
> And, after that:
> 
> # xl cpupool-cpu-remove Pool-0 7
> 
> And the system hanged.
> 
> I don't have a working serial console on that testbox, unfortunately,
> so I can't poke at debug keys, etc.
> 
> Is this anything that you've seen or that you can reproduce?

I can reproduce it and already have found the bug.


Juergen


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-09  9:33 [Xen-devel] [PATCH v3 0/4] xen/sched: use new idle scheduler for free cpus Juergen Gross
2019-09-09  9:33 ` [Xen-devel] [PATCH v3 1/4] xen/sched: populate cpupool0 only after all cpus are up Juergen Gross
2019-09-13 16:54   ` Dario Faggioli
2019-09-09  9:33 ` [Xen-devel] [PATCH v3 2/4] xen/sched: remove cpu from pool0 before removing it Juergen Gross
2019-09-13 17:27   ` Dario Faggioli
2019-09-14  5:04     ` Juergen Gross [this message]
2019-09-09  9:33 ` [Xen-devel] [PATCH v3 3/4] xen/sched: add minimalistic idle scheduler for free cpus Juergen Gross
2019-09-09  9:33 ` [Xen-devel] [PATCH v3 4/4] xen/sched: switch to debugtrace in cpupool handling Juergen Gross
2019-09-12  8:24   ` Dario Faggioli

Reply instructions:

You may reply publically 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=f96be1bb-9881-a300-4f4d-24c3c2fdb7bf@suse.com \
    --to=jgross@suse.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=dfaggioli@suse.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien.grall@arm.com \
    --cc=konrad.wilk@oracle.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --cc=wl@xen.org \
    --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

Xen-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/xen-devel/0 xen-devel/git/0.git
	git clone --mirror https://lore.kernel.org/xen-devel/1 xen-devel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 xen-devel xen-devel/ https://lore.kernel.org/xen-devel \
		xen-devel@lists.xenproject.org xen-devel@archiver.kernel.org
	public-inbox-index xen-devel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.xenproject.lists.xen-devel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox