All of lore.kernel.org
 help / color / mirror / Atom feed
From: Henry Wang <Henry.Wang@arm.com>
To: Michal Orzel <michal.orzel@amd.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	Julien Grall <julien@xen.org>,
	Bertrand Marquis <Bertrand.Marquis@arm.com>,
	Wei Chen <Wei.Chen@arm.com>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
Subject: RE: [PATCH 2/2] xen/arm: Handle reserved heap pages in boot and heap allocator
Date: Tue, 30 Aug 2022 10:04:50 +0000	[thread overview]
Message-ID: <AS8PR08MB7991780D566C3EEEAD7F5BF092799@AS8PR08MB7991.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <c749e3aa-39a2-a4a8-9a21-77a65881dca5@amd.com>

Hi Michal,

> -----Original Message-----
> From: Michal Orzel <michal.orzel@amd.com>
> >
> > Oh I think get your point. Let me try to explain myself and thanks for your
> > patience :))
> >
> > The reserved heap region defined in the device tree should be used for
> both
> > Xenheap and domain heap, so if we reserved a too small region (<32M),
> > an error should pop because the reserved region is not enough for
> xenheap,
> > and user should reserve more.
> > [...]
> >
> >> But your check is against heap being to small (less than 32M).
> >> So basically if the following check fails:
> >> "( reserved_heap && reserved_heap_pages < 32<<(20-PAGE_SHIFT) ) )"
> >> it means that the heap region defined by a user is too small (not too large),
> >> because according to requirements it should be at least 32M.
> >
> > [...]
> > So in that case, printing "Not enough space for xenheap" means the
> reserved
> > region cannot satisfy the minimal requirement of the space of xenheap (at
> least
> > 32M), and this is in consistent with the check.
> 
> Ok, it clearly depends on the way someone understands this sentence.
> Currently this panic can be triggered if the heap size is too large and
> should be read as "heap is too large to fit in because there is not enough
> space
> within RAM considering modules (e - s < size)". Usually (and also in this case)
> space refers to a region to contain another one.
> 
> You are reusing the same message for different meaning, that is "user
> defined too
> small heap and this space (read as size) is not enough".

Yes, thanks for the explanation. I think maybe rewording the message
to "Not enough memory for allocating xenheap" would remove the ambiguity
to some extent? Because the user-defined heap region should cover both
xenheap and domain heap at the same time, the small user-defined heap
means "xenheap is too large to fit in the user-defined heap region", which is
in consistent with your interpretation of the current "xenheap is too large to fit
in because there is not enough space within RAM considering modules"

> 
> Let's leave it to someone else to decide.

I agree.

Kind regards,
Henry

> 
> ~Michal

  reply	other threads:[~2022-08-30 10:05 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-24  7:31 [PATCH 0/2] Introduce reserved heap Henry Wang
2022-08-24  7:31 ` [PATCH 1/2] docs, xen/arm: Introduce reserved heap memory Henry Wang
2022-08-24 13:46   ` Michal Orzel
2022-08-25  1:04     ` Henry Wang
2022-08-30  0:47       ` Stefano Stabellini
2022-08-30  0:58         ` Henry Wang
2022-08-30  6:29           ` Michal Orzel
2022-08-30  7:10             ` Michal Orzel
2022-08-30  7:21               ` Henry Wang
2022-08-30  0:45   ` Stefano Stabellini
2022-08-30  1:02     ` Henry Wang
2022-09-01 14:36   ` Julien Grall
2022-09-02  1:28     ` Henry Wang
2022-09-02  8:01       ` Julien Grall
2022-09-02  8:21         ` Henry Wang
2022-08-24  7:31 ` [PATCH 2/2] xen/arm: Handle reserved heap pages in boot and heap allocator Henry Wang
2022-08-25 11:24   ` Michal Orzel
2022-08-30  6:11     ` Henry Wang
2022-08-30  7:19       ` Michal Orzel
2022-08-30  8:00         ` Henry Wang
2022-08-30  8:48           ` Michal Orzel
2022-08-30  9:17             ` Henry Wang
2022-08-30  9:48               ` Michal Orzel
2022-08-30 10:04                 ` Henry Wang [this message]
2022-08-30 17:28                   ` Stefano Stabellini
2022-08-31  1:36                     ` Henry Wang
2022-08-30 17:32           ` Stefano Stabellini
2022-09-01  1:03         ` Henry Wang
2022-09-01 13:31           ` Bertrand Marquis
2022-09-01 13:52             ` Henry Wang
2022-08-30  1:04   ` Stefano Stabellini
2022-08-30  8:27     ` Henry Wang
2022-08-30 17:25       ` Stefano Stabellini
2022-08-31  1:24         ` Henry Wang
2022-08-31  2:00           ` Henry Wang
2022-08-31 22:58           ` Stefano Stabellini
2022-09-01  0:49             ` Henry Wang
2022-09-01 13:58     ` Julien Grall
2022-09-01 14:01       ` Henry Wang
2022-09-01 14:02         ` Julien Grall
2022-09-01 15:29   ` Julien Grall
2022-09-01 16:05     ` Henry Wang
2022-09-01 17:08       ` Stefano Stabellini
2022-09-01 17:34         ` Julien Grall
2022-09-02  1:50           ` Stefano Stabellini
2022-09-02  3:02             ` Wei Chen
2022-09-02  3:07               ` Wei Chen
2022-09-02  8:04                 ` Julien Grall
2022-09-02  9:49                   ` Wei Chen
2022-09-01 17:19       ` Julien Grall
2022-09-02  3:30         ` Henry Wang
2022-09-02  8:11           ` Julien Grall
2022-09-02  8:18             ` Henry Wang

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=AS8PR08MB7991780D566C3EEEAD7F5BF092799@AS8PR08MB7991.eurprd08.prod.outlook.com \
    --to=henry.wang@arm.com \
    --cc=Bertrand.Marquis@arm.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=Wei.Chen@arm.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.