[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [PATCH 2/2] xen/arm: Handle reserved heap pages in boot and heap allocator


  • To: Michal Orzel <michal.orzel@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Tue, 30 Aug 2022 09:17:36 +0000
  • Accept-language: zh-CN, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=U4CXnsArGcDUZI14zv4DeQPs0Vt2NmkQTfi4JcXNyIs=; b=e7jIW8z4EYlvjOSXzSRumHmld6jNObh+s8O81kXTFmOgE8DZT3huEnyisXGBO2OZ7KtcMSG+k6tVxdrofkRraf7imCQUvahq6W8xO9dBrR/NiJUuaPVGWJEtcCivVjkBrbnvwHjL1nyiTEJgwOSgTQ2vX6k9lnBGcYvbeYL4CfgY1UMk67IeRBO5f6hCFEmM8En2Au7pFHH1S0J3HLUc7MZE6SaY9dZhGlF+WnlwMNidy589buZdwWWypfURZcNW2Pf4WY///7c2ObUTJLeDblFel1wYq787crdh3GfBv75FftzGXmXzbdLOF0tBIs24zGIAZkHIi97QqCJeN+a6VQ==
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=U4CXnsArGcDUZI14zv4DeQPs0Vt2NmkQTfi4JcXNyIs=; b=cOkA1gO9YxyDh63Pap4jbuyzuygoeRnMxmu//mHJaYzEjKz5rravsQTjavnXrPiJQW+mQ9wYHd2uB0usnfMPjmo4RvtgSpYtc2rkSkX49h5bvHom1ofU9vrUuQWuL6OesX4wBPSr1MIjz8NbMr+Z2alw+rMhJ4H7N2fud3jEtjMDawCHSm1765a2oGgu++FlcH9fYKyuF/2NlIXb9Wfmx0wwgb8k2ORE+ch0UUL9L48JKon1ZopBnhGHB7yxU0Q8qT/tuSayThH58Qp/aFfTVqYb08GhZkzXqz+DDxbUYGfps0DkCmdwuY+Uev+z2RBtP+GcMCDEY3gy2kS9kn7U1Q==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=AkIYCNHTe44POMlsFNnT/bHMREggUiRhk+UFaPAVIFeupez9dXv9X7SWDikFMMK8A0LEqgqRYqUQCh68PL6USrckTncjDhWRtFf6OoV72s3+jFmwicdWnwtW1Vfq6chiuvQdFAC+2KaHZuxVyDIFdtoEF//3xzPa41nf9dLrizlrVDpeNZbtXiSz5hkFJMl0DkKF4fr6XJQLJ7rOu1X6RjUWDwF3LV7orRM9a0jFqus1BVGzLGd5ocNGyJP8W5jIKnoNtdf/ABM4jF5ZHNNnrM1g197xVtdNKZc8+fzQjzD1bzYDW7PqwyYoBR3TuHwgjDBEIYo8lHqQ/7t/dclMuQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Nzn8ZSCWab7uoCuDc16nzPDwgdoeZ9rBMrMW50kf6aJPAx77D5El9lURgG5jSgvdMXNNPNjc9giWw7RRVXUKX8U6fliM2veDW5Fy2m3JF+Jl+sUTtkUcEK/NfcMf6euWYhMuuy7uCUu0IUpb4Oxm9Qq/nrWk9P3NlTcd00J61h4mJHl0EAKLxLvstbvZjH363n2//dVnLcpkhlRFkVdge240zCs1yFxI7F1sheKKRm1zldHjivvfed2r46w06dL+b9BHhd6vI5Zw6j3f0sBPT3celriqGfbW7QlbT9n/9/RglaNcwu8CryYO49UvSn99keXrkxNXN1ASG4UApJt0oA==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Tue, 30 Aug 2022 09:18:11 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHYt4ugTfbCAM/WyEil7pMplK0r3q2/e0SAgAeAsxCAABaogIAAAyrggAAVl4CAAAH9oA==
  • Thread-topic: [PATCH 2/2] xen/arm: Handle reserved heap pages in boot and heap allocator

Hi Michal,

> -----Original Message-----
> From: Michal Orzel <michal.orzel@xxxxxxx>
> >> This is totally fine. What I mean is that the check you introduced does not
> >> correspond
> >> to the panic message below. In case of reserved heap, its size is selected
> by
> >> the user.
> >> "Not enough space for xenheap" means that there is not enough space to
> be
> >> reserved for heap,
> >> meaning its size is too large. But your check is about size being too 
> >> small.
> >
> > Actually my understanding of "Not enough space for xenheap" is xenheap
> > is too large so we need to reserve more space, which is slightly different
> than
> > your opinion. But I am not the native speaker so it is highly likely that I 
> > am
> > making mistakes...
> My understanding is exactly the same as yours :),
> meaning heap is too large.

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.

Kind regards,
Henry






 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.