[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 10:04:50 +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=4qthMqPOK4Zm5n0wFiLqH26a0Ujq2B7pIOp1ugKY5EU=; b=g+8nXm8RMpSSfrRgB0dP+Rq4N9MT+Xb0wv/osuhI/t/qkobluudj4GSh5G+QHDL2pgqLdTJDK/tyOJs4CsE2LPvsCwqWQmkSHsv7aqGNrCRJZ94/cl+xRTLdfOGp5bFaTHBL2BZKfZpuTH8cZ0Z0rBoGSJJKq10ZlBm3LBdJkGbni7x7XBS2P2ShsbeLTmmK1CBFwidEdDZjnkAZ94mVQG9GyWhoVk7BHiHzzZTsBWQn60I4xnOQBI+necCT9lMW2aijCatkxFMr1x7kp+HKpI6MzFaArLGQCngsCexVLLtK1n3uMZ1Cvs2TVH7h8S85gO5SwJCQNGlVFoQRni7KoQ==
  • 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=4qthMqPOK4Zm5n0wFiLqH26a0Ujq2B7pIOp1ugKY5EU=; b=MDyNZ5nw0ALeN/tRDspn6/LD6jAy6uz9+fJ4jb9nssDkxAKUQq2lHa6wyAbwynei7x81k/tJ11VxeS8zfaJx9FRyIYcl9gUWrinqeQ6dElrlXw/UGUEgLF319kT1K6XoaYK0aYryon+BzVjqsO7Ezvuz5ocvLsddzpCTJv3tz3cNxA7RbY8hULvYTMP1ujNQdq6YWga0JoH/Hv9hKq7YUbfeDhtVJDyhjgclsPmHm5YDhyrWfVD88Mb7xzYngR/0/zunAhTfpLEuGLSeY8XfFcsT3sp2nXEe2gLExE253L1x2QRlpWIhngioElIgLv/QGuPHRDEYPPJhP8GiaUaLug==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=mr19ZoZ6MJ/KQHQ+6itrENMdHZp2Gqzu677ZhLZBn7/jCPrZU7CBdEfIyveMDlUy8UwRZ8/bCm45MHpb3h8vUJXLIAFJg/S6fycLRd64tA+FYQRj7P2p3D/klUoSaB+rk88UISPWG26z33+bH+rjJpTWlV4HUeLugzmoCyA9j/2a9+TZEjWKPQEHoX0hwMot15RqntK3RkIRyMRBq8uNsqhC+tCtp0nLR75sy9dyI6Tw16Z1Dtx8Ysj/LPDMCM4XN94wV7LxWfFwXTuhiPQaVtZ97la35X4SKtA5gmVF859GY43KoO5DKXizbDC7wqoCbD9XspbGJsWvW3lXAN6DsA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gWelSGymqX4eIol9A1qD7YdtqaX6/qUWQuRp2WgNWT2fGxK8XeLafcOE+gr6OCoUBL1NSrdTb2kfPJ7hyfOWS+/J6SAwpaW7cUpv+oqgiipMhYf9mrkOszbJntYy2nbD7xXq+Wx5B6fzbDFWA2AN+tMHf/qLGwecVSA8yA81PdZh0pXkSjDXdU0Pqgpjm9+g3vzDeGMKnZ7mh3hpIDULeSPvoGpk4ST7/3pmLbFGwQT74UJ6hgdsU4ilHQaf9S9K6+fJnvXZAvgB2golwCes4yQfVV+FDAAaf7egqjUmSdidrmAhpNi6iNsFZIrVt4oKV4UlYuuqMNLeALgr2Tvfcw==
  • 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 10:05:17 +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/e0SAgAeAsxCAABaogIAAAyrggAAVl4CAAAH9oIAADu+AgAABegA=
  • 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>
> >
> > 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

 


Rackspace

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