[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: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Wed, 31 Aug 2022 01:36:53 +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=Edq4u2FkrHdb++OclwVOmwF7+BE/+T/T0nTduWVCH4U=; b=QAivcqETvMhK6E99dTnWixWnvuwbj0W2VNL7SurRY5dxedRx1JZiKIcfK5O2+OlbjX5YXLbqMn+V30MNdIz/BEmkQP2JAdDT8Z2SgAAa8/75Z5k+77OMGUnXEXwxtEpfieOpyeC1y/TYcGP4MYEeB5COef8BA/ajV7n4uttVf4O1un7c7bvMAe9X6jbOX5Hp5Rj5IK5rlbOeBO7q+EBd6Ny+Fzj2PMtqbSrrvuPfudHfGUeF3LZl7V4SIFo0iwa2XvQ8YJl08Ymt7Oqax3nAkdtRjZ1aHxbUgb55z3jnf6W8efE4BH2MOez1ZAcbdN1iv6QLT9fnj5lPrW7opXiXOA==
  • 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=Edq4u2FkrHdb++OclwVOmwF7+BE/+T/T0nTduWVCH4U=; b=VCN7SENLSbV4eh2uROJvd3cn7PbYQPZ/M83gGU7/zDZavGwWYqAybiKTPQfynLNjvtZZbhdzqdAUPjDZnlWInZgk5tGAuo0993XUOxjiOPBZHTA9fwEd1DcIxhj8rors0qWqYB+gPscIrKCUVMHAKkZHqpgNSq4pbbyD3RBJFGJHAsfrCn12S3UMiUJ9xAGmA/DthHZHUX1gD0jZtYIRurm7HESE2R3JJradEyWWSBlUiAtAowZXbnxU//IvlVmGI7Af6Pe91DGXyKITP5OHfWD/peH/oWgyus2a9jugOHFLKA4JxiD0OJTNxeyRoCV6Qdx5qYubqnMupBTZodqYng==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=P9Bq2ww+XICTlh74Fr1jS90Bkc/iUGE5FT3Gf8kvQNpnhuw1wRyYMDgy6M3gsPXo6Q9rknlkywGICGVT27AP+Ty6n6uC1LfLpqz/O+u0izwo5/s7EYj7HmJ1TBReIky1sMKjGxVPppVtvA1GvYayRtbMn/xq5EjLWArJ5YmzINMPVGqR9rtvfP7gxxuyh8HqnmXUEiAY0GbfWkqCQBMzxcMAby54UOKlIR7uDp4fpgyHdU4UeimNC97T8rIzaZ2PM4sP68NRUfxHKVHJbowxpzdPg8wQOVC/HCT0onNLqqLu6heCuzinOfi9kAjkgvBHG+dXy83xhKFDezjFNmR53A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b8gFlxFiiSGZAz++zfWhhNw/peUgu1qhYna3hwdbymoFi2AA0kwXz1aWubqN9TskQrj3+b78BH96628X2NbvQ65Wi6SbznYvkAhXh/q47DlPi/YiNxNUK51yfW6b32P28Eew0hZA5uR6sKF6dOUfo/RQppsXZ0nCPWOasHmNvjMobmALEJP+fy2rZmzlg44N7bYhp8IbcWCb5u0hBooDTTY7wF+bFaQrlSXcX6wDNi8RK619TpBAtaYTWkD9FezdL7l0RURdbPuiE7zLn/oJwuRbufngKMzG+o1rC8D9XRqJ/5N4o0qUMoaN02fY6qXNjUIAJtAimd7rf/F65jw3Sw==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Michal Orzel <michal.orzel@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Wed, 31 Aug 2022 01:37:22 +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+AgAABegCAAH7kAIAAiGiQ
  • Thread-topic: [PATCH 2/2] xen/arm: Handle reserved heap pages in boot and heap allocator

Hi Stefano,

> -----Original Message-----
> From: Stefano Stabellini <sstabellini@xxxxxxxxxx>
> Subject: RE: [PATCH 2/2] xen/arm: Handle reserved heap pages in boot and
> heap allocator
> 
> On Tue, 30 Aug 2022, Henry Wang wrote:
> > > -----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"
> 
> I think we should have a separate check specific for the device tree
> input parameters to make sure the region is correct, that way we can
> have a specific error message, such as:
> 
> "xen,static-heap address needs to be 32MB aligned and the size a
> multiple of 32MB."

Sure, will follow this.

Kind regards,
Henry




 


Rackspace

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