From: Matthew Wilcox <willy@infradead.org>
To: Vitaly Wool <vitaly.wool@konsulko.se>
Cc: linux-mm@kvack.org, akpm@linux-foundation.org,
linux-kernel@vger.kernel.org, Uladzislau Rezki <urezki@gmail.com>,
Danilo Krummrich <dakr@kernel.org>,
Alice Ryhl <aliceryhl@google.com>,
Vlastimil Babka <vbabka@suse.cz>,
rust-for-linux@vger.kernel.org,
Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
"Liam R . Howlett" <Liam.Howlett@oracle.com>,
Kent Overstreet <kent.overstreet@linux.dev>,
linux-bcachefs@vger.kernel.org, bpf@vger.kernel.org,
Herbert Xu <herbert@gondor.apana.org.au>,
Jann Horn <jannh@google.com>, Pedro Falcato <pfalcato@suse.de>
Subject: Re: [PATCH v13 1/4] :mm/vmalloc: allow to set node and align in vrealloc
Date: Tue, 15 Jul 2025 15:37:13 +0100 [thread overview]
Message-ID: <aHZnmevtRYt26LBE@casper.infradead.org> (raw)
In-Reply-To: <20250715135724.2230116-1-vitaly.wool@konsulko.se>
On Tue, Jul 15, 2025 at 03:57:24PM +0200, Vitaly Wool wrote:
> +void *__must_check vrealloc_node_align_noprof(const void *p, size_t size,
> + unsigned long align, gfp_t flags, int nid) __realloc_size(2);
> +#define vrealloc_node_noprof(_p, _s, _f, _nid) \
> + vrealloc_node_align_noprof(_p, _s, 1, _f, _nid)
> +#define vrealloc_noprof(_p, _s, _f) \
> + vrealloc_node_align_noprof(_p, _s, 1, _f, NUMA_NO_NODE)
> +#define vrealloc_node_align(...) alloc_hooks(vrealloc_node_align_noprof(__VA_ARGS__))
> +#define vrealloc_node(...) alloc_hooks(vrealloc_node_noprof(__VA_ARGS__))
> +#define vrealloc(...) alloc_hooks(vrealloc_noprof(__VA_ARGS__))
I think we can simplify all of this.
void *__must_check vrealloc_noprof(const void *p, size_t size,
unsigned long align, gfp_t flags, int nid) __realloc_size(2);
#define vrealloc_node_align(...) \
alloc_hooks(vrealloc_noprof(__VA_ARGS__))
#define vrealloc_node(p, s, f, nid) \
alloc_hooks(vrealloc_noprof(p, s, 1, f, nid))
#define vrealloc(p, s, f) \
alloc_hooks(vrealloc_noprof(p, s, 1, f, NUMA_NO_NODE))
next prev parent reply other threads:[~2025-07-15 14:37 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-15 13:56 [PATCH v13 0/4] support large align and nid in Rust allocators Vitaly Wool
2025-07-15 13:57 ` [PATCH v13 1/4] :mm/vmalloc: allow to set node and align in vrealloc Vitaly Wool
2025-07-15 14:37 ` Matthew Wilcox [this message]
2025-07-30 17:25 ` Vitaly Wool
2025-07-15 13:58 ` [PATCH v13 1/4] mm/vmalloc: " Vitaly Wool
2025-07-15 14:25 ` Liam R. Howlett
2025-07-15 13:58 ` [PATCH v13 2/4] mm/slub: allow to set node and align in k[v]realloc Vitaly Wool
2025-07-15 14:33 ` Danilo Krummrich
2025-07-15 15:34 ` Vlastimil Babka
2025-07-15 15:48 ` Danilo Krummrich
2025-07-15 16:12 ` Danilo Krummrich
2025-07-25 8:47 ` Vlastimil Babka
2025-07-15 13:58 ` [PATCH v13 3/4] rust: add support for NUMA ids in allocations Vitaly Wool
2025-07-24 9:27 ` Alice Ryhl
2025-07-29 8:25 ` Danilo Krummrich
2025-07-15 13:58 ` [PATCH v13 4/4] rust: support large alignments " Vitaly Wool
2025-07-24 9:27 ` Alice Ryhl
2025-07-24 20:54 ` [PATCH v13 0/4] support large align and nid in Rust allocators Andrew Morton
2025-07-25 7:14 ` Alice Ryhl
2025-07-25 8:26 ` Vlastimil Babka
2025-07-25 10:00 ` Danilo Krummrich
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=aHZnmevtRYt26LBE@casper.infradead.org \
--to=willy@infradead.org \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=aliceryhl@google.com \
--cc=bpf@vger.kernel.org \
--cc=dakr@kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=jannh@google.com \
--cc=kent.overstreet@linux.dev \
--cc=linux-bcachefs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=pfalcato@suse.de \
--cc=rust-for-linux@vger.kernel.org \
--cc=urezki@gmail.com \
--cc=vbabka@suse.cz \
--cc=vitaly.wool@konsulko.se \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).