From nobody Sun Feb 8 22:02:34 2026 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1581060302446224.7035739509464; Thu, 6 Feb 2020 23:25:02 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1izxzo-0007I8-K7; Fri, 07 Feb 2020 07:24:12 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1izxzn-0007I3-0B for xen-devel@lists.xenproject.org; Fri, 07 Feb 2020 07:24:11 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id d45dfdde-497a-11ea-b2cb-bc764e2007e4; Fri, 07 Feb 2020 07:24:09 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 07443AFC6; Fri, 7 Feb 2020 07:24:07 +0000 (UTC) X-Inumbo-ID: d45dfdde-497a-11ea-b2cb-bc764e2007e4 X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Date: Fri, 7 Feb 2020 08:24:05 +0100 Message-Id: <20200207072405.2236-1-jgross@suse.com> X-Mailer: git-send-email 2.16.4 Subject: [Xen-devel] [PATCH] xen/sched: add some diagnostic info in the run queue keyhandler X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , George Dunlap , Dario Faggioli MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" When dumping the run queue information add some more data regarding current and (if known) previous vcpu for each physical cpu. Signed-off-by: Juergen Gross --- xen/common/sched/core.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/xen/common/sched/core.c b/xen/common/sched/core.c index d4e8944e0e..103d94bd02 100644 --- a/xen/common/sched/core.c +++ b/xen/common/sched/core.c @@ -3235,7 +3235,7 @@ void scheduler_free(struct scheduler *sched) =20 void schedule_dump(struct cpupool *c) { - unsigned int i; + unsigned int i, j; struct scheduler *sched; cpumask_t *cpus; =20 @@ -3246,7 +3246,7 @@ void schedule_dump(struct cpupool *c) if ( c !=3D NULL ) { sched =3D c->sched; - cpus =3D c->cpu_valid; + cpus =3D c->res_valid; printk("Scheduler: %s (%s)\n", sched->name, sched->opt_name); sched_dump_settings(sched); } @@ -3256,11 +3256,18 @@ void schedule_dump(struct cpupool *c) cpus =3D &cpupool_free_cpus; } =20 - if ( sched->dump_cpu_state !=3D NULL ) + printk("CPUs info:\n"); + for_each_cpu (i, cpus) { - printk("CPUs info:\n"); - for_each_cpu (i, cpus) - sched_dump_cpu_state(sched, i); + struct sched_resource *sr =3D get_sched_res(i); + + printk("CPU[%02d] current=3D%pv, curr=3D%pv, prev=3D%pv\n", i, + get_cpu_current(i), sr->curr ? sr->curr->vcpu_list : NULL, + sr->prev ? sr->prev->vcpu_list : NULL); + for_each_cpu (j, sr->cpus) + if ( i !=3D j ) + printk("CPU[%02d] current=3D%pv\n", j, get_cpu_current(j)); + sched_dump_cpu_state(sched, i); } =20 rcu_read_unlock(&sched_res_rculock); --=20 2.16.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel