xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Dario Faggioli <dfaggioli@suse.com>
To: Stefano Stabellini <sstabellini@kernel.org>, George.Dunlap@eu.citrix.com
Cc: xen-devel@lists.xenproject.org
Subject: Re: [Xen-devel] dom0less + sched=null => broken in staging
Date: Fri, 09 Aug 2019 19:57:42 +0200	[thread overview]
Message-ID: <f986544f59e1b2e9fddba5090fc3c706c38e1ad3.camel@suse.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1908071119470.2451@sstabellini-ThinkPad-T480s>


[-- Attachment #1.1.1: Type: text/plain, Size: 1688 bytes --]

On Wed, 2019-08-07 at 11:22 -0700, Stefano Stabellini wrote:
> Hi Dario, George,
> 
> Dom0less with sched=null is broken on staging, it simply hangs soon
> after Xen is finished loading things. My impression is that vcpus are
> not actually started. I did a git bisection and it pointed to:
> 
> commit d545f1d6c2519a183ed631cfca7aff0baf29fde5 (refs/bisect/bad)
> Author: Dario Faggioli <dfaggioli@suse.com>
> Date:   Mon Aug 5 11:50:55 2019 +0100
> 
>     xen: sched: deal with vCPUs being or becoming online or offline
>     
> Any ideas?
> 
Ok, I've done some basic testing, and inspected the code again, and
honestly I am not finding anything really suspicious.

Of course, I'm not really testing dom0less, and I'm not sure I can
easily do that.

Can you help me with this, e.g., by providing some more info and, if
possible, logs?

E.g., you say boot stops after Xen loading. Is there a bootlog that we
can see (ideally from a debug build, and with "loglvl=all
guest_loglvl=all")?

Does the system respond to debug-keys? If yes, the log after triggering
the 'r' debug-key would be useful.

These patches are about vcpus going offline and online... does dom0less
play with vcpu onffline/online in any way?

I've put together a debug patch (attached), focusing on what the
mentioned commit does, but it's nothing more than a shot in the dark,
for now...

Thanks and 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.1.2: xen-sched-null-vcpu-onoff-debug.patch --]
[-- Type: text/x-patch, Size: 1594 bytes --]

diff --git a/xen/common/sched_null.c b/xen/common/sched_null.c
index 26c6f0f129..afd42e552f 100644
--- a/xen/common/sched_null.c
+++ b/xen/common/sched_null.c
@@ -455,6 +455,7 @@ static void null_vcpu_insert(const struct scheduler *ops, struct vcpu *v)
 
     if ( unlikely(!is_vcpu_online(v)) )
     {
+        dprintk(XENLOG_G_INFO, "Not inserting %pv (not online!)\n", v);
         vcpu_schedule_unlock_irq(lock, v);
         return;
     }
@@ -516,6 +517,7 @@ static void null_vcpu_remove(const struct scheduler *ops, struct vcpu *v)
     /* If offline, the vcpu shouldn't be assigned, nor in the waitqueue */
     if ( unlikely(!is_vcpu_online(v)) )
     {
+        dprintk(XENLOG_G_INFO, "Not removing %pv (wasn't online!)\n", v);
         ASSERT(per_cpu(npc, v->processor).vcpu != v);
         ASSERT(list_empty(&nvc->waitq_elem));
         goto out;
@@ -635,6 +637,8 @@ static void null_vcpu_sleep(const struct scheduler *ops, struct vcpu *v)
         }
         else if ( per_cpu(npc, cpu).vcpu == v )
             tickled = vcpu_deassign(prv, v);
+
+        dprintk(XENLOG_G_INFO, "%pv is, apparently, going offline (tickled=%d)\n", v, tickled);
     }
 
     /* If v is not assigned to a pCPU, or is not running, no need to bother */
@@ -697,6 +701,8 @@ static void null_vcpu_migrate(const struct scheduler *ops, struct vcpu *v,
      */
     if ( unlikely(!is_vcpu_online(v)) )
     {
+        dprintk(XENLOG_G_INFO, "%pv is, apparently, going offline\n", v);
+
         spin_lock(&prv->waitq_lock);
         list_del_init(&nvc->waitq_elem);
         spin_unlock(&prv->waitq_lock);

[-- 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

  parent reply	other threads:[~2019-08-09 17:58 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-07 18:22 [Xen-devel] dom0less + sched=null => broken in staging Stefano Stabellini
2019-08-08  8:04 ` George Dunlap
2019-08-08 20:44   ` Stefano Stabellini
2019-08-09  7:40     ` Dario Faggioli
2019-08-09 17:57 ` Dario Faggioli [this message]
2019-08-09 18:30   ` Stefano Stabellini
2019-08-13 15:27     ` Dario Faggioli
2019-08-13 16:52       ` Julien Grall
2019-08-13 17:34         ` Dario Faggioli
2019-08-13 18:43           ` Julien Grall
2019-08-13 22:26             ` Julien Grall
2019-08-13 22:34             ` Dario Faggioli
2019-08-13 23:07               ` Julien Grall
2019-08-13 21:14       ` Stefano Stabellini
2019-08-14  2:04         ` Dario Faggioli
2019-08-14 16:27           ` Stefano Stabellini
2019-08-14 17:35             ` Dario Faggioli
2019-08-21 10:33               ` Dario Faggioli
2019-08-24  1:16                 ` Stefano Stabellini
2019-09-11 13:53                   ` Dario Faggioli
2019-09-25 15:19                     ` Julien Grall
2019-09-25 15:34                       ` Dario Faggioli
2019-09-25 15:39                         ` Julien Grall
2019-09-25 15:41                           ` Jürgen Groß
2019-10-28  5:35                   ` Dario Faggioli
2019-10-28 18:40                     ` Stefano Stabellini

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=f986544f59e1b2e9fddba5090fc3c706c38e1ad3.camel@suse.com \
    --to=dfaggioli@suse.com \
    --cc=George.Dunlap@eu.citrix.com \
    --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).