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

Re: [PATCH v2 09/13] xen/arm: Reduce struct membank size on static shared memory


  • To: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Wed, 10 Apr 2024 13:01:34 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=arm.com 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 (0)
  • 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=quqC/nHW5U9z+dpT4T4w7Vsx8hDiZoRV7wsaXcL3PAc=; b=Y61HTsfUZ+zj0ocwRMGhqLlDHNHK34+HWqz3aOyZJzkSmbEDQdLgfA6uVXDyhQabwrKTOUmhWYp7GBb8E24N5c0HqHqtJYNGgauPm4R/y75o4WtR69NAHLgjemehbHyMnxo01m09KmH+cHjB4OFAlREmkkD0dVBm8pS0ch7oob7vGpN+TjfpLE9W4wIfZ+2L9dFF26DoP3KFQQTwIURODvlKdTAx5wkie256sfzaTGf1AhAvNjVwwNxYS7Scf0Wex+EMnoydv3yKjg3mWLUUBQHnQOI/13NSDocGIxiDAuF3khXwNOBiOJbAsUY1aiqtCnas9BaDa8UIWSUVxhdrlA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bQ5uo0mfvkjQP+qgoXeCchqVRWtpR7NBoFgkll2+FG64GhKFvIFIt9m1Igtsdyp7yF6CSAPdYlboEKC9pUfAWqIGiW6r/3/34kOGqp6saWw8uFY9lbWANjo2rTDtdgD7Plsq4Flb0jLN04712iCiIfu4qY6BD2yu1szr3pecdb3Urgs77W1En17tOnmzo9TC/nWmgrN66cbrsyyMZK/4t4c8blW+qgZfNORLqh17HRYnBBJXxlSSzBddS2Aapjm6CHg86DhZ/SdPsPBBBfo6OFk+c/kNmMP4taYJZQMwjU58VqQ1lHfQa+62c/R6kPyUeYIy1vtnjnGN2gBZTq78FQ==
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Wed, 10 Apr 2024 11:01:49 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 10/04/2024 12:56, Luca Fancellu wrote:
> 
> 
> Hi Michal,
> 
>> On 10 Apr 2024, at 11:01, Michal Orzel <michal.orzel@xxxxxxx> wrote:
>>
>> Hi Luca,
>>
>> On 09/04/2024 13:45, Luca Fancellu wrote:
>>>
>>>
>>> Currently the memory footprint of the static shared memory feature
>>> is impacting all the struct meminfo instances with memory space
>>> that is not going to be used.
>>>
>>> To solve this issue, rework the static shared memory extra
>>> information linked to the memory bank to another structure,
>>> struct shmem_membank_extra, and exploit the struct membank
>>> padding to host a pointer to that structure in a union with the
>>> enum membank_type, with this trick the 'struct membank' has the
>>> same size with or without the static shared memory, given that
>>> the 'type' and 'shmem_extra' are never used at the same time,
>>> hence the 'struct membank' won't grow in size.
>>>
>>> Afterwards, create a new structure 'struct shared_meminfo' which
>>> has the same interface of 'struct meminfo', but requires less
>> I would expect some justification for selecting 32 as the max number of 
>> shmem banks
> 
> So I have to say I picked up a value I thought was ok for the amount of 
> shared memory
> Banks, do you think it is too low? The real intention here was to decouple 
> the number
> of shared memory banks from the number of generic memory banks, and I felt 32 
> was enough,
> but if you think it might be an issue I could bump it, or we could have a 
> Kconfig...
No need for Kconfig. 32 is enough for now but I expect a paragraph in commit 
msg that you select
32 which should be enough for current use cases and can be bumped in the future 
in case there is a need.

> 
>>>
>>>
>>> Signed-off-by: Luca Fancellu <luca.fancellu@xxxxxxx>
>> With the find_unallocated_memory() issue fixed:
>> Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>
> 
> Thanks, I took the opportunity to improve the comment in that function in 
> this way,
> adding “ (when the feature is enabled)":
> 
>      * 3) Remove static shared memory (when the feature is enabled)
> 
> Please tell me if that works for you so I will keep your R-by
You can retain Rb.

~Michal



 


Rackspace

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