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

Discussion of Xenheap problems on AArch64


  • To: "julien@xxxxxxx" <julien@xxxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Wed, 21 Apr 2021 06:28:14 +0000
  • Accept-language: zh-CN, en-US
  • 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=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-SenderADCheck; bh=UOTyxBPNVJA25Xqiadw4Yf5whuom7JJkrVxTeR4Dm2g=; b=Ir90m31Vfv4NAZOaVCbaSv8knKEMhnOpb4RY1/Mk29mZCiBKbfzAU+9IBVdNHg7f0tswi0KKFYGpdIPXinoHEcLxzIu/APMC8cqEJnyHWKVQyxWV8yaxPeuSrRLAMHL9wkmMI9sWeL5GIR8CIaKjOlWvTnQyaxZKxGKyXijGO2zNXiXhKh/2jDRoOKuxQniB1k3YCkPFpjpLz3lbQ1KGjwy6+N8M+YjAN9Cc9QYE8aSi/STJgPOxSYiKU69IOogeG92Csr7jfu5/0hPds41cpblJaF+UAXhsyJ0HT49ejiVmdZnhMD7lPNP+hoW4iqcL3lpfxagshIZVCY4bPnUNWw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nikPUsaNF7Dy8TuOLIQpTL922meJIg4DPVH3zQlh6+HJNOnHpjLsT6sDXDSEvTtBLHaqKdFZzayoIonR7qhxqvkD2XBJkePW2kLPEO0NgfZpVZ73CrL1PvCEYs1z8u6iIoJuDFTfigWizY7AIOoVfyoiTb4V1bR/G3lhsRub86pUaHRZPWfBYNBg30+kzgdQm1Da/VwC3q8g3+FxojUPBkcxmC1hUwYvQQLyWOVr/hQonWBmNHP0X3F+SpldlJKaPWO3tbmdj/RKVlP83v6fHZEZyrOaYyoOCLaVy3P+KEgOCAVhC9xyM0n9C5RUcSk2mFZI0/IcjrmjjPrPM8z3Fw==
  • Authentication-results-original: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=arm.com;
  • Cc: Wei Chen <Wei.Chen@xxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Delivery-date: Wed, 21 Apr 2021 06:28:57 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=arm.com;
  • Thread-index: Adc2dyA8lkZGRqbyRiSglHolanVkwQ==
  • Thread-topic: Discussion of Xenheap problems on AArch64

Hi,

We are trying to implement the static memory allocation on AArch64. Part of
this feature is the reserved heap memory allocation, where a specific range of
memory is reserved only for heap. In the development process, we found a
pitfall in current AArch64 setup_xenheap_mappings() function.

According to a previous discussion in community
https://lore.kernel.org/xen-devel/20190216134456.10681-1-peng.fan@xxxxxxx/,
on AArch64, bootmem is initialized after setup_xenheap_mappings(),
setup_xenheap_mappings() may try to allocate memory before memory has been
handed over to the boot allocator. If the reserved heap memory allocation is
introduced, either of below 2 cases will trigger a crash:

1. If the reserved heap memory is at the end of the memory block list and the
gap between reserved and unreserved memory is bigger than 512GB, when we setup
mappings from the beginning of the memory block list, we will get OOM caused
by lack of pages in boot allocator. This is because the memory that is reserved
for heap has not been mapped and added to the boot allocator.

2. If we add the memory that is reserved for heap to boot allocator first, and
then setup mappings for banks in the memory block list, we may get a page which
has not been setup mapping, causing a data abort.

Also, according to Julien's reply in previous mailing list discussion, we are
meant to support up to 5TB of RAM (see
https://lists.xenproject.org/archives/html/xen-devel/2018-12/msg00881.html).
Therefore, we think that maybe it is the time to re-visit this problem and try
to find a proper way to address it. Any comments?

Kind regards,

Henry



 


Rackspace

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