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

Re: [PATCH v2 1/4] docs, xen/arm: Introduce reserved heap memory


  • To: Julien Grall <julien@xxxxxxx>, Henry Wang <Henry.Wang@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Tue, 6 Sep 2022 08:34:15 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=xen.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6cV2/+PYa5+t3tkC0QaGXJzpjfNp0WjGvwv4ZDJmXiM=; b=IBcfEomIdiTYV9Elt9nJZwWB/P+7CtguwZ1AMFSj6U8FJElDLvSoJY2AwFqZs/RDcm9FcLwZ205nh9IApLjKgFCCbA9kdEp5yQ0TuyAgQiVnKEmjBhYQPYpIWQFj9GOSff74HAsFrO9yodpZHrmRed2WEnzmxZdAvjfK23KfQAcc9E/n5OoeDWMa6YC70VGeqaVeA5kUXkiLD5H8yhqR1EoS6jBYZNlO6NMVp8gu5MUbkl6f/jfx1DUwT7nkGbhoTskUFVNctp3a17jSf+DS7aieRhTwaIvD9fV2mlDzIqgXj5Plg+8OLeF3fRtgpMEtXK/ybV2qTdcijShz+gmMDg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JNsOOFWAMO/U4JTKxIUlr314C8rdCmA24BwwQr1tqbqvolXqD4U+NHBl+5Oh0tJJiR1xyU4ro4kVQTHKEyYAfhIDnLF0HtkILTdesaROR34hwdSXusuCHj7hGDRO1pvHoWhBbNSZIKjWLyxkxH+wiZvHkBkzsx6vGNUL6mp42pBDXO1Brz8raOj9jaj+HXQCW1xdq216ZriDaNygWClWusVCaKzhOdGb9ixt0n6izUX9ZCE3AiYDPihBoSwkWb9qdOJKyXuaJZTZa0IUmLNNVlsN9TwOX3TDa6ISopaisr0BWlUAOnItHhLh/1stn6bD7Pz3s7DpP07ahoitnnbmVw==
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Wei Chen <wei.chen@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Penny Zheng <penny.zheng@xxxxxxx>
  • Delivery-date: Tue, 06 Sep 2022 06:34:39 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Julien,

On 05/09/2022 19:24, Julien Grall wrote:
> 
> Hi Michal,
> 
> On 05/09/2022 13:04, Michal Orzel wrote:
>> On 05/09/2022 09:26, Henry Wang wrote:
>>>
>>> diff --git a/xen/arch/arm/include/asm/setup.h 
>>> b/xen/arch/arm/include/asm/setup.h
>>> index 5815ccf8c5..d0cc556833 100644
>>> --- a/xen/arch/arm/include/asm/setup.h
>>> +++ b/xen/arch/arm/include/asm/setup.h
>>> @@ -22,11 +22,16 @@ typedef enum {
>>>       BOOTMOD_UNKNOWN
>>>   }  bootmodule_kind;
>>>
>>> +typedef enum {
>>> +    MEMBANK_MEMORY,
>>> +    MEMBANK_XEN_DOMAIN, /* whether the memory bank is bound to a Xen 
>>> domain. */
>>> +    MEMBANK_RSVD_HEAP, /* whether the memory bank is reserved as heap. */
>>> +} membank_type;
>> Whereas the patch itself looks ok (it must be modified anyway given the 
>> comments for patch #2),
>> MEMBANK_XEN_DOMAIN name is quite ambiguous to me, now when it is part of 
>> membank_type enum.
>> Something like MEMBANK_STATIC or MEMBANK_STATICMEM would be much cleaner in 
>> my opinion
>> as it would directly indicate what type of memory we are talking about.
> 
> I am not sure. Technically the reserved heap is static memory that has
> been allocated for the heap. In fact, I think thn name "staticmem" is
> now becoming quite confusing because we are referring to a very specific
> use case (i.e. memory that has been reserved for domain use).
> 
> So I would prefer if we keep "domain" in the name. Maybe
> MEMBANK_STATIC_DOMAIN or MEMBANK_RESERVED_DOMAIN.
> 
Personally I would drop completely using the "reserved heap" naming in favor
of "static heap" because "staticmem" is also something we reserve at boot time 
for a domain use.
This would also directly correlate to the device tree property "static-heap" 
and "static-mem".
Then such enum would be created as follows and for me this is the cleanest 
solution:
MEMBANK_DEFAULT
MEMBANK_STATIC_DOMAIN
MEMBANK_STATIC_HEAP

But I think we are already too late in this series to request such changes, so
with the current naming we can go for:
MEMBANK_DEFAULT
MEMBANK_RSVD_DOMAIN /* memory reserved for a domain use */
MEMBANK_RSVD_HEAP   /* memory reserved for a heap use */

> Cheers,
> 
> --
> Julien Grall

~Michal



 


Rackspace

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