From: Ian Campbell <ian.campbell@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Wei Liu <wei.liu2@citrix.com>,
Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
IanJackson <Ian.Jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
Julien Grall <julien.grall@citrix.com>,
xen-devel <xen-devel@lists.xenproject.org>,
Keir Fraser <keir@xen.org>
Subject: Re: [PATCH] x86/NUMA: make init_node_heap() respect Xen heap limit
Date: Fri, 4 Sep 2015 09:52:49 +0100 [thread overview]
Message-ID: <1441356769.26292.430.camel@citrix.com> (raw)
In-Reply-To: <55E974C7020000780009F8A4@prv-mh.provo.novell.com>
On Fri, 2015-09-04 at 02:39 -0600, Jan Beulich wrote:
> >
> > > > On 04.09.15 at 10:27, <ian.campbell@citrix.com> wrote:
> > On Fri, 2015-09-04 at 01:37 -0600, Jan Beulich wrote:
> > > > > > On 03.09.15 at 22:58, <julien.grall@citrix.com> wrote:
> > > > And found why! The last xenheap_bits changed from 39 to 38.
> > > >
> > > > On x-gene the last max mfn used for the xenheap is 0x4400000, which
> > > > the
> > > > new computation, it will give 38 bits which doesn't cover the
> > > > entire
> > > > xenheap range.
> > > >
> > > > I have wrote a patch to fix the issue, but I'm not sure that it's
> > > > the right things to do (see below).
> > >
> > > No, this is wrong: xenheap_bits isn't meant to cover all RAM, it is
> > > meant to indicate how much (as an exact power of 2) of RAM is
> > > always accessible. I'm surprised anyway that ARM64 uses
> > > xenheap_max_mfn() (and even unconditionally); I thought all RAM
> > > is always accessible there. The invocation is off by one now in any
> > > case, but rather than correcting it that way the proper fix likely
> > > will involve more than just this simple an adjustment, as it looks
> > > like its use was wrong from the beginning (commit 5263507b1b).
> >
> > What is the correct thing which arm64 should be doing, given that today
> > all
> > RAM is indeed always mapped? Not call xenheap_max_mfn at all, therefore
> > leaving xenheap_bits == 0?
>
> Yes, if all memory is always accessible, then no limit should be
> enforced at all, i.e. the call be dropped.
>
> Just for the record - even with the call in place it escapes me why
> this causes any problem: All it tells the allocator is to not hand out
> pages above a certain limit when asked for Xen heap pages. Sadly
> I wasn't able to interpret the dumped information (after the crash)
> in a way telling me what actually went wrong.
"create_xen_entries: L2 failed" tells me, through code inspection rather
than usefulness of the logging, that alloc_xenheap_page has returned NULL.
I think this is simply because all RAM on Mustang is at physical address
128GB onwards or so, IOW the off by one error has resulted in the xenheap
appearing to be empty since all RAM above the limit.
> IOW - I'm afraid
> there's a second problem here that's going to be hidden again
> when the call gets removed.
>
> Jan
>
next prev parent reply other threads:[~2015-09-04 8:52 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-27 8:37 [PATCH] x86/NUMA: make init_node_heap() respect Xen heap limit Jan Beulich
2015-08-27 9:25 ` Wei Liu
2015-08-27 10:11 ` Andrew Cooper
2015-08-27 14:43 ` Wei Liu
2015-09-01 10:28 ` Ian Campbell
2015-09-03 20:01 ` Julien Grall
2015-09-03 20:58 ` Julien Grall
2015-09-04 7:37 ` Jan Beulich
2015-09-04 8:27 ` Ian Campbell
2015-09-04 8:39 ` Jan Beulich
2015-09-04 8:52 ` Ian Campbell [this message]
2015-09-04 9:09 ` Jan Beulich
2015-09-04 11:29 ` Julien Grall
2015-09-04 12:02 ` Jan Beulich
2015-09-04 12:05 ` Wei Liu
2015-09-04 12:50 ` Julien Grall
2015-09-04 12:57 ` Ian Campbell
2015-09-04 12:52 ` Ian Campbell
2015-09-04 12:53 ` 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=1441356769.26292.430.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=Stefano.Stabellini@eu.citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=julien.grall@citrix.com \
--cc=keir@xen.org \
--cc=tim@xen.org \
--cc=wei.liu2@citrix.com \
--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).