xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Dario Faggioli <dfaggioli@suse.com>
To: "Julien Grall" <julien@xen.org>,
	"Anders Törnqvist" <anders.tornqvist@codiax.se>,
	xen-devel@lists.xenproject.org,
	"Stefano Stabellini" <sstabellini@kernel.org>
Subject: Re: Null scheduler and vwfi native problem
Date: Mon, 25 Jan 2021 17:11:12 +0100	[thread overview]
Message-ID: <d92c4191fb81e6d1de636f281c8624d68f8d14fc.camel@suse.com> (raw)
In-Reply-To: <744ddde6-a228-82fc-76b9-401926d7963b@xen.org>

[-- Attachment #1: Type: text/plain, Size: 2700 bytes --]

On Fri, 2021-01-22 at 14:26 +0000, Julien Grall wrote:
> Hi Anders,
> 
> On 22/01/2021 08:06, Anders Törnqvist wrote:
> > On 1/22/21 12:35 AM, Dario Faggioli wrote:
> > > On Thu, 2021-01-21 at 19:40 +0000, Julien Grall wrote:
> > - booting with "sched=null vwfi=native" but not doing the IRQ 
> > passthrough that you mentioned above
> > "xl destroy" gives
> > (XEN) End of domain_destroy function
> > 
> > Then a "xl create" says nothing but the domain has not started
> > correct. 
> > "xl list" look like this for the domain:
> > mydomu                                   2   512     1 ------      
> > 0.0
> 
> This is odd. I would have expected ``xl create`` to fail if something
> went wrong with the domain creation.
>
So, Anders, would it be possible to issue a:

# xl debug-keys r
# xl dmesg

And send it to us ?

Ideally, you'd do it:
 - with Julien's patch (the one he sent the other day, and that you 
   have already given a try to) applied
 - while you are in the state above, i.e., after having tried to 
   destroy a domain and failing
 - and maybe again after having tried to start a new domain

> One possibility is the NULL scheduler doesn't release the pCPUs until
> the domain is fully destroyed. So if there is no pCPU free, it
> wouldn't 
> be able to schedule the new domain.
> 
> However, I would have expected the NULL scheduler to refuse the
> domain 
> to create if there is no pCPU available.
> 
Yeah but, unfortunately, the scheduler does not have it easy to fail
domain creation at this stage (i.e., when we realize there are no
available pCPUs). That's the reason why the NULL scheduler has a
waitqueue, where vCPUs that cannot be put on any pCPU are put.

Of course, this is a configuration error (or a bug, like maybe in this
case :-/), and we print warnings when it happens.

> @Dario, @Stefano, do you know when the NULL scheduler decides to 
> allocate the pCPU?
> 
On which pCPU to allocate a vCPU is decided in null_unit_insert(),
called from sched_alloc_unit() and sched_init_vcpu().

On the other hand, a vCPU is properly removed from its pCPU, hence
making the pCPU free for being assigned to some other vCPU, in
unit_deassign(), called from null_unit_remove(), which in turn is
called from sched_destroy_vcpu() Which is indeed called from
complete_domain_destroy().

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 #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2021-01-25 16:11 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-21 10:54 Null scheduler and vwfi native problem Anders Törnqvist
2021-01-21 18:32 ` Dario Faggioli
2021-01-21 19:40   ` Julien Grall
2021-01-21 23:35     ` Dario Faggioli
2021-01-22  8:06       ` Anders Törnqvist
2021-01-22  9:05         ` Dario Faggioli
2021-01-22 14:26         ` Julien Grall
2021-01-22 17:44           ` Anders Törnqvist
2021-01-25 15:45             ` Dario Faggioli
2021-01-25 16:11           ` Dario Faggioli [this message]
2021-01-26 17:03             ` Anders Törnqvist
2021-01-26 22:31               ` Dario Faggioli
2021-01-29  8:08                 ` Anders Törnqvist
2021-01-29  8:18                   ` Jürgen Groß
2021-01-29 10:16                     ` Dario Faggioli
2021-02-01  6:53                       ` Anders Törnqvist
2021-01-30 17:59                   ` Dario Faggioli
2021-02-01  6:55                     ` Anders Törnqvist
2021-02-02  7:59                     ` Julien Grall
2021-02-02 15:03                       ` Dario Faggioli
2021-02-02 15:23                         ` Julien Grall
2021-02-03  7:31                           ` Dario Faggioli
2021-02-03  9:19                             ` Julien Grall
2021-02-03 11:00                               ` Jürgen Groß
2021-02-03 11:20                                 ` Julien Grall
2021-02-03 12:02                                   ` Jürgen Groß
2021-02-15  7:15                     ` Anders Törnqvist
2021-01-22 14:02       ` Julien Grall
2021-01-22 17:30         ` Anders Törnqvist
2021-01-22  8:07   ` Anders Törnqvist
2021-01-21 19:16 ` Julien Grall

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=d92c4191fb81e6d1de636f281c8624d68f8d14fc.camel@suse.com \
    --to=dfaggioli@suse.com \
    --cc=anders.tornqvist@codiax.se \
    --cc=julien@xen.org \
    --cc=sstabellini@kernel.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
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).