xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Dario Faggioli <dario.faggioli@citrix.com>
To: Konrad Rzeszutek Wilk <konrad@kernel.org>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: xen-devel@lists.xenproject.org, julien.grall@arm.com,
	sstabellini@kernel.org
Subject: Re: CONFIG_SCRUB_DEBUG=y + arm64 + livepatch = Xen BUG at page_alloc.c:738
Date: Wed, 13 Sep 2017 09:56:18 +0200	[thread overview]
Message-ID: <1505289378.3642.4.camel@citrix.com> (raw)
In-Reply-To: <20170913000147.GA6632@localhost.localdomain>


[-- Attachment #1.1: Type: text/plain, Size: 1691 bytes --]

On Tue, 2017-09-12 at 20:01 -0400, Konrad Rzeszutek Wilk wrote:
> > On 09/11/2017 07:55 PM, Konrad Rzeszutek Wilk wrote:
> > > I've only been able to reproduce this on ARM64 (trying right now
> > > ARM32
> > > as well), and not on x86.
> > > 
> > > If I compile Xen without CONFIG_SCRUB_DEBUG it works great. But
> > > if
> > > enable it and try to load a livepatch it blows up in
> > > page_alloc.c:738
> > > 
> I honestly think the issue is that on ARM64 the "sleep" loop does not
> wake up as often as on x86 (CC-ing Dariof who I believe observed this
> with Credit2 and the wakeup.. something) - maybe he remembers the
> details. Anyhow my theory is that the pages are not scrubbed at all
> when they go in the idle loop as once it goes to sleep - it stays
> there.
> 
> Ah, see commit 05c52278a7c92bc753d9fe32017e4961012b9f23 
> 
> Maybe this is related?
>
As Boris is saying, it really should not. In fact, having pages that
needs scrubbing _prevents_ the CPU from becoming idle (and stopping the
tick, if any).

What we observed is that x86 periodically wakes up, even on a totally
idle system, while ARM doesn't. But this should not be a problem as, in
both cases, if there's pages to scrub, the CPU just won't go to sleep.

If frequent wakeups is what causes the scrubbing to work ok on the x86,
and not on ARM, it IMO means that there's something like a race
somewhere.

Regards,
Dario
-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

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

      parent reply	other threads:[~2017-09-13  7:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-11 23:55 CONFIG_SCRUB_DEBUG=y + arm64 + livepatch = Xen BUG at page_alloc.c:738 Konrad Rzeszutek Wilk
2017-09-12  0:45 ` Boris Ostrovsky
2017-09-13  0:01   ` Konrad Rzeszutek Wilk
2017-09-13  1:19     ` Boris Ostrovsky
2017-09-13 15:32       ` Konrad Rzeszutek Wilk
2017-09-13 18:05         ` Boris Ostrovsky
2017-09-13 18:25           ` Julien Grall
2017-09-13 18:49             ` Boris Ostrovsky
2017-09-14 21:26               ` Konrad Rzeszutek Wilk
2017-09-14 21:39                 ` Boris Ostrovsky
2017-09-15 18:48                   ` Konrad Rzeszutek Wilk
2017-09-15 19:20                     ` Boris Ostrovsky
2017-09-15 19:50                     ` Konrad Rzeszutek Wilk
2017-09-15 20:28                       ` Julien Grall
2017-09-13  7:56     ` Dario Faggioli [this message]

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=1505289378.3642.4.camel@citrix.com \
    --to=dario.faggioli@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=julien.grall@arm.com \
    --cc=konrad@kernel.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).