[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: Michal Orzel <michal.orzel@xxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Wed, 10 Apr 2024 10:56:30 +0000
  • Accept-language: en-GB, 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=9fsC73++81eeedQtknHK4B8IVXnjeiza5AogDnYS240=; b=FZwPquNxfQp8ZarZhY3YAZMD07SsFKnzcad+k2zUpPgDeYDsreY+xIoiW4jWzkcGUUATc9yABAArHhfUXRlbTINjH3LsBcpfDkU/1My7QGff+NgtMSysyJz4bvK3prDGAJ+7xyOeSlPdmdhqN14YF+QJu25JA21YCCl+RXPipGOsqwpEH4FDB+ylq5nDI6bSHswpStyiW0s0vgMyBvYME3oywKs5sDi5L71eaDz6rFYgElilCvQH1qFl9tDkOgO8qt0//HlwP387DcBBeEnPd7RQDb56/eg/npWWvdyROQjIJqcVdi6PdroKXKhaoHXVMjYgtIpfcTa5YIAd9jSi2g==
  • 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=9fsC73++81eeedQtknHK4B8IVXnjeiza5AogDnYS240=; b=XB539sxIVTKa8wCCJm3F6FWE+Ff8FND+qtvz9ghLlHMo90T8wKLFqmMJ3Q/t4+ZMRSw0lY4xDXPm/YvUBVQCEsJvZJEmsmYwso74eALiSWD0F6uFsEgQ8EaWf4hj9bmPeVeb4soOrwXsREtT+h/ruKANMqFwNTDGC7/ddN0Rd2FbpEws66c0i/2tqumjbJF7pZHoy7Tmq7OkVW4DQCo2BRaa2bpPjlQNvLxENh+Xg6Zo5n0PRGKot4CtO9VPvHzSawYnGp8thbL2UmVe8QnO5wQtwo70z6aPMj9yiWnVDmn5pVS6SGv9ww+KPI++C1JZ7hZ0TYiopszrF8Pvopvo9Q==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=cnYZa4BYZXSZe0evdslpCYqT4PIjsGXqiFnLqQXS0Y1bEbQmosTXfpown9CF0FcbYUrUGy3jfkQ7cBoCPMJMsfrcIoRgMnfgi+q6ESBOY4Ngk1copiWtf9fwwqsNbpmP3Bnrr3I05hc3GojMrsJUYdrseLSWM/onYNUuuRXVUpRqQwBKCMPOokY3PTLyMDtx7JBFGrHlVUZ7u0wmF4gBen6DRQyRoWl/aQpnY0HlNDW6V2i+E/xGcXck8ugINjDnX1uMl6og8baR01FlVpg1IkJ5FC3JDIWqQXCxTkxoHJmFDbMMlkt7CAVcgaa0kdHC9+rNaxJyTp6eJOQeo2RlsA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XrgmxmP43lBS5JzgLXiO/mI8/RmNNAgY0EJCsMJ4vlpQXJhB6xeKENlpuwEgpWatWjF53PWRjMGRG2oNEjg53YdVQBuh+uSsCir6T5fn7n9RXJtwNSaGndvZR+lsEfFchEvuyZf8JuQ4imQ/uI93j7pUDJrVPze/k9F08ql3s+6+gBCoJzx1GKqKJk7+0QECzzfhP6Wgm3HBCKFuhTe9MIYLVlfqlXQDr2k0tPQE4ULyIKcmuG/nwaZ0DL0YUN0NNxagZBSmhHyO51IDUeMsls+nyXuch4b2oP3oW4x72YbwiRdl0lxoINPq4lZDywHTSIA8pe4jbfKm3mf0PDNK6Q==
  • 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 10:57:00 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Thread-index: AQHainOQqOQ8ACmqS0SD80lqrmS1tLFhR1gAgAAPMQA=
  • Thread-topic: [PATCH v2 09/13] xen/arm: Reduce struct membank size on static shared memory

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...

>> 
>> 
>> 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

Cheers,
Luca

> 
> ~Michal


 


Rackspace

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