All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Orzel <michal.orzel@amd.com>
To: Luca Fancellu <Luca.Fancellu@arm.com>
Cc: Xen-devel <xen-devel@lists.xenproject.org>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Julien Grall <julien@xen.org>,
	Bertrand Marquis <Bertrand.Marquis@arm.com>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
Subject: Re: [PATCH v2 6/7] xen/arm: Implement the logic for static shared memory from Xen heap
Date: Mon, 20 May 2024 15:13:34 +0200	[thread overview]
Message-ID: <07db0c52-5063-4f2d-82e9-26ca8167524c@amd.com> (raw)
In-Reply-To: <6AC54D50-7277-44ED-8C69-9E4984C3531C@arm.com>



On 20/05/2024 15:11, Luca Fancellu wrote:
> 
> 
>>>
>>>>
>>>>> +    struct shmem_membank_extra *bank_extra_info;
>>>>> +} alloc_heap_pages_cb_extra;
>>>>> +
>>>>> +static struct meminfo __initdata shm_heap_banks = {
>>>>> +    .common.max_banks = NR_MEM_BANKS
>>>> Do we expect that many banks?
>>>
>>> Not really, but I was trying to don’t introduce another type, do you think it’s better instead to
>>> introduce a new type only here, with a lower amount of banks?
>> I'd be ok with meminfo provided you add a reasoning behind this being meminfo and not shared_meminfo.
>>
>>>
>>> Because if we take struct shared_meminfo, we would waste mem for its ‘extra’ member.
>> Would it result in a smaller footprint overall?
> 
> Well overall yes, meminfo now is 255 banks, shared_meminfo is 64 in total, even if we use 32 of them and
> 32 are wasted.
> 
> Otherwise, as I said, I could do something like this in this module:
> 
> static struct shared_heap_meminfo {
>     struct membanks_hdr common;
>     struct membank bank[NR_SHMEM_BANKS];
> } __initdata shm_heap_banks = {
>     .common.max_banks = NR_SHMEM_BANKS
> };
If that's all it takes to avoid defining unnecessarily big variable, then I'd be ok with it.

~Michal


  reply	other threads:[~2024-05-20 13:14 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-15 14:26 [PATCH v2 0/7] Static shared memory followup v2 - pt2 Luca Fancellu
2024-05-15 14:26 ` [PATCH v2 1/7] xen/arm: Lookup bootinfo shm bank during the mapping Luca Fancellu
2024-05-16 13:05   ` Michal Orzel
2024-05-15 14:26 ` [PATCH v2 2/7] xen/arm: Wrap shared memory mapping code in one function Luca Fancellu
2024-05-16 13:19   ` Michal Orzel
2024-05-16 13:24     ` Luca Fancellu
2024-05-15 14:26 ` [PATCH v2 3/7] xen/p2m: put reference for level 2 superpage Luca Fancellu
2024-05-16 13:42   ` Michal Orzel
2024-05-15 14:26 ` [PATCH v2 4/7] xen/arm: Parse xen,shared-mem when host phys address is not provided Luca Fancellu
2024-05-20  9:34   ` Michal Orzel
2024-05-15 14:26 ` [PATCH v2 5/7] xen/arm: Rework heap page allocation outside allocate_bank_memory Luca Fancellu
2024-05-20  9:42   ` Michal Orzel
2024-05-15 14:26 ` [PATCH v2 6/7] xen/arm: Implement the logic for static shared memory from Xen heap Luca Fancellu
2024-05-20 11:16   ` Michal Orzel
2024-05-20 12:44     ` Luca Fancellu
2024-05-20 13:01       ` Michal Orzel
2024-05-20 13:11         ` Luca Fancellu
2024-05-20 13:13           ` Michal Orzel [this message]
2024-05-15 14:26 ` [PATCH v2 7/7] xen/docs: Describe static shared memory when host address is not provided Luca Fancellu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=07db0c52-5063-4f2d-82e9-26ca8167524c@amd.com \
    --to=michal.orzel@amd.com \
    --cc=Bertrand.Marquis@arm.com \
    --cc=Luca.Fancellu@arm.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=julien@xen.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.