All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "Daniel P. Smith" <dpsmith@apertussolutions.com>
Cc: Marek Marczykowski <marmarek@invisiblethingslab.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH v3] EFI/runtime: switch to xv[mz]alloc_array()
Date: Tue, 12 Aug 2025 08:12:39 +0200	[thread overview]
Message-ID: <755dd957-514b-4316-82f5-3619c19cbb15@suse.com> (raw)
In-Reply-To: <761b584a-51fb-403d-948e-3366501cea50@apertussolutions.com>

On 12.08.2025 02:19, Daniel P. Smith wrote:
> On 7/23/25 09:39, Jan Beulich wrote:
>> Use the more "modern" form, thus doing away with effectively open-coding
>> xmalloc_array() at the same time. While there is a difference in
>> generated code, as xmalloc_bytes() forces SMP_CACHE_BYTES alignment, if
>> code really cared about such higher than default alignment, it should
>> request so explicitly.
> 
> While I don't object to the change itself, I think this description is a 
> bit over simplification of the change. If the allocation is under 
> PAGE_SIZE, then they are equivalent, but if it is over the page size 
> there are a few more differences than just cache alignment. It 
> completely changes the underlying allocator. I personally also find it a 
> bit of a stretch to call xmalloc_bytes(size) an open coded version of 
> xmalloc_array(char, size).

My take is that xmalloc_bytes() should never have existed. Hence why I
didn't add xzmalloc_bytes() when introducing that family of interfaces.

> With a stronger description of the change,

So what exactly do you mean by "stronger"? I can add that in the unlikely
event that one of the allocations is (near) PAGE_SIZE or larger, we now
wouldn't require contiguous memory anymore. Yet based on your comment at
the top I'm not quite sure if that's what you're after and/or enough to
satisfy your request.

> Acked-by: Daniel P. Smith <dpsmith@apertussolutions.com>

Thanks, but will need clarification first as per above.

Jan


  reply	other threads:[~2025-08-12  6:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-23 13:39 [PATCH v3] EFI/runtime: switch to xv[mz]alloc_array() Jan Beulich
2025-07-24  1:59 ` dmkhn
2025-08-11 12:34 ` Ping: " Jan Beulich
2025-08-12  0:19 ` Daniel P. Smith
2025-08-12  6:12   ` Jan Beulich [this message]
2025-08-14  0:29     ` Daniel P. Smith
2025-08-14  6:46       ` Jan Beulich
2025-08-25 11:06         ` Jan Beulich
2025-11-25 15:14           ` Daniel P. Smith

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=755dd957-514b-4316-82f5-3619c19cbb15@suse.com \
    --to=jbeulich@suse.com \
    --cc=dpsmith@apertussolutions.com \
    --cc=marmarek@invisiblethingslab.com \
    --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.