Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2B418CE7A94 for ; Mon, 25 Sep 2023 11:15:25 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.607828.946146 (Exim 4.92) (envelope-from ) id 1qkjYO-00038j-Mp; Mon, 25 Sep 2023 11:15:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 607828.946146; Mon, 25 Sep 2023 11:15:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qkjYO-00038c-Jx; Mon, 25 Sep 2023 11:15:04 +0000 Received: by outflank-mailman (input) for mailman id 607828; Mon, 25 Sep 2023 11:15:03 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qkjYN-00038W-3B for xen-devel@lists.xenproject.org; Mon, 25 Sep 2023 11:15:03 +0000 Received: from mail.actia.se (mail.actia.se [212.181.117.226]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id c56138b0-5b94-11ee-878a-cb3800f73035; Mon, 25 Sep 2023 13:15:02 +0200 (CEST) Received: from S036ANL.actianordic.se (10.12.31.117) by S035ANL.actianordic.se (10.12.31.116) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Mon, 25 Sep 2023 13:15:01 +0200 Received: from S036ANL.actianordic.se ([fe80::e13e:1feb:4ea6:ec69]) by S036ANL.actianordic.se ([fe80::e13e:1feb:4ea6:ec69%4]) with mapi id 15.01.2507.032; Mon, 25 Sep 2023 13:15:01 +0200 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c56138b0-5b94-11ee-878a-cb3800f73035 From: Jonas Blixt To: "xen-devel@lists.xenproject.org" Subject: Xen(arm64) hang on suspend/resume Thread-Topic: Xen(arm64) hang on suspend/resume Thread-Index: Adnvmnpoa5ryhO19Q7aaxFF2dGz1TQ== Date: Mon, 25 Sep 2023 11:15:01 +0000 Message-ID: <3c79ea2fec984e21b07d9365c08a5862@actia.se> Accept-Language: en-US, sv-SE Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.12.12.144] x-esetresult: clean, is OK x-esetid: 37303A294A191A5C6C7262 Content-Type: multipart/alternative; boundary="_000_3c79ea2fec984e21b07d9365c08a5862actiase_" MIME-Version: 1.0 --_000_3c79ea2fec984e21b07d9365c08a5862actiase_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello, I've encountered a strange behavior with Xen on arm64 with regards to suspe= nd/resume. My setup: Version: Xen 4.13.1 Target: NXP imx8x SoC We also use a set of patches from Aggios (https://xen-devel.narkive.com/yGp= s0HKG/rfc-v2-xen-arm-suspend-to-ram-support-in-xen-for-arm) Occasionally xen gets stuck on resume. We know that the lower levels wake u= p and xen starts to resume because xen's debug console is available. When w= e're in this state dom0 does not resume and both pCPU's are in idle loops. = If we at this point issue debug console commands (like 'h' for the help men= u) that schedule tasklets dom0 wakes up and continues. Debug function that = run in the irq-handler does not have the same effect. This is what the run queue looks like: sched_smt_power_savings: disabled NOW=3D490275382125 Online Cpus: 0-1 Cpupool 0: Cpus: 0-1 Scheduler: SMP Credit Scheduler rev2 (credit2) Active queues: 1 default-weight =3D 256 Runqueue 0: ncpus =3D 2 cpus =3D 0-1 max_weight =3D 256 pick_bias =3D 1 instload =3D 1 aveload =3D 282294 (~107%) idlers: 0 tickled: 0 fully idle cores: 0 Domain info: Domain: 0 w 256 c 0 v 2 1: [0.0] flags=3D2 cpu=3D1 credit=3D984625 [w=3D256] load=3D208781 (~= 79%) 2: [0.1] flags=3D0 cpu=3D1 credit=3D9742375 [w=3D256] load=3D25693 (~= 9%) Domain: 1 w 256 c 0 v 1 3: [1.0] flags=3D0 cpu=3D1 credit=3D10447250 [w=3D256] load=3D7835 (~= 2%) Runqueue 0: CPU[00] runq=3D0, sibling=3D{0}, core=3D{0} CPU[01] runq=3D0, sibling=3D{1}, core=3D{1} run: [0.0] flags=3D2 cpu=3D1 credit=3D-1543000 [w=3D256] load=3D208781 = (~79%) RUNQ: 0: [0.1] flags=3D0 cpu=3D1 credit=3D10275375 [w=3D256] load=3D25279 (= ~9%) [t: display multi-cpu clock info] Synced stime skew: max=3D125ns avg=3D125ns samples=3D1 current=3D125ns Synced cycles skew: max=3D1 avg=3D1 samples=3D1 current=3D1 I would be grateful if I could get some hint's on how to debug this. Best Regards Jonas --_000_3c79ea2fec984e21b07d9365c08a5862actiase_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hello,

 

I’ve encountered a strang= e behavior with Xen on arm64 with regards to suspend/resume.

 

My setup:

Vers= ion: Xen 4.13.1

Targ= et: NXP imx8x SoC

 

We a= lso use a set of patches from Aggios (https://= xen-devel.narkive.com/yGps0HKG/rfc-v2-xen-arm-suspend-to-ram-support-in-xen= -for-arm)

 

Occa= sionally xen gets stuck on resume. We know that the lower levels wake up an= d xen starts to resume because xen’s debug console is available. When we’re in this state dom0 does not resume and both= pCPU’s are in idle loops. If we at this point issue debug console co= mmands (like ‘h’ for the help menu) that schedule tasklets dom0= wakes up and continues. Debug function that run in the irq-handler does not have the same effect.

 

This is what the run queue look= s like:

 

sched_smt_power_savings: disabl= ed

NOW=3D490275382125

Online Cpus: 0-1

Cpupool 0:

Cpus: 0-1

Scheduler: SMP Credit Scheduler= rev2 (credit2)

Active queues: 1

    default-weig= ht     =3D 256

Runqueue 0:

    ncpus &= nbsp;            =3D= 2

    cpus &n= bsp;            = ; =3D 0-1

    max_weight&n= bsp;        =3D 256

    pick_bias&nb= sp;         =3D 1=

    instload&nbs= p;          =3D 1

    aveload = ;           =3D 282294 (~= 107%)

    idlers: 0

    tickled: 0

    fully idle c= ores: 0

Domain info:<= /p>

    Domain: 0 w = 256 c 0 v 2

      = 1: [0.0] flags=3D2 cpu=3D1 credit=3D984625 [w=3D256] load=3D208781 (~79%)

      = 2: [0.1] flags=3D0 cpu=3D1 credit=3D9742375 [w=3D256] load=3D25693 (~9%)

    Domain: 1 w = 256 c 0 v 1

      = 3: [1.0] flags=3D0 cpu=3D1 credit=3D10447250 [w=3D256] load=3D7835 (~2%)

Runqueue 0:

CPU[00] runq=3D0, sibling=3D{0}= , core=3D{0}

CPU[01] runq=3D0, sibling=3D{1}= , core=3D{1}

    run: [0.0] f= lags=3D2 cpu=3D1 credit=3D-1543000 [w=3D256] load=3D208781 (~79%)

RUNQ:

      = 0: [0.1] flags=3D0 cpu=3D1 credit=3D10275375 [w=3D256] load=3D25279 (~9%)

[t: display multi-cpu clock inf= o]

Synced stime skew: max=3D125ns = avg=3D125ns samples=3D1 current=3D125ns

Synced cycles skew: max=3D1 avg= =3D1 samples=3D1 current=3D1

 

I would be grateful if I could = get some hint’s on how to debug this.

 

Best Regards<= /p>

Jonas

 

 

--_000_3c79ea2fec984e21b07d9365c08a5862actiase_--