From: Harry Yoo <harry@kernel.org>
To: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>
Cc: Gary Guo <gary@garyguo.net>, Boqun Feng <boqun@kernel.org>,
Nathan Chancellor <nathan@kernel.org>,
Bert Karwatzki <spasswolf@web.de>,
linux-kernel@vger.kernel.org, linux-next@vger.kernel.org,
Alice Ryhl <aliceryhl@google.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
rust-for-linux@vger.kernel.org, Miguel Ojeda <ojeda@kernel.org>,
Mark Brown <broonie@kernel.org>
Subject: Re: rust compile failure in next-20260730
Date: Thu, 6 Aug 2026 05:52:26 +0000 [thread overview]
Message-ID: <anQftbfg8EWMmxZc@dev> (raw)
In-Reply-To: <7189ebb5-ae48-4466-9055-1ab1b0b5ef7c@kernel.org>
On Tue, Aug 04, 2026 at 12:35:42PM +0200, Vlastimil Babka (SUSE) wrote:
> On 8/4/26 12:10, Gary Guo wrote:
> > On Mon Aug 3, 2026 at 10:04 PM BST, Vlastimil Babka (SUSE) wrote:
> >> On 8/3/26 17:32, Gary Guo wrote:
> >>> On Mon Aug 3, 2026 at 4:10 PM BST, Vlastimil Babka (SUSE) wrote:
> >>>> On 8/3/26 16:23, Boqun Feng wrote:
> >>>>> On Mon, Aug 03, 2026 at 02:57:49PM +0100, Gary Guo wrote:
> >>>>>>
> >>>>>> We could also unconditionally use `kvfree_rcu_head` here, and
> >>>>>> add
> >>>>>>
> >>>>>> #[cfg(not(CONFIG_KVFREE_RCU_BATCHED))]
> >>>>>> pub type kvfree_rcu_head = callback_head;
> >>>>>>
> >>>>>> to bindings.rs?
> >>>>>>
> >>>>>
> >>>>> This option is currently not maintainable unless it becomes a
> >>>>> maintainer-aware way to handle things like this.
> >>>>>
> >>>>>> (Or even better, changing `#define` to `typedef` so bindgen takes care of
> >>>>>> everything).
> >>>>>>
> >>>>>
> >>>>> Yes, this is better IMO, but it's up to slab maintainers. :-)
> >>>>
> >>>> Can you elaborate a bit please, how would that look like?
> >>>
> >>> I was thinking of doing `typedef struct rcu_head kvfree_rcu_head;` but of course
> >>> that didn't work because you can't use typedef to create `kvfree_rcu_head` :)
> >>>
> >>> However, something like this could work?
> >>>
> >>> #ifdef CONFIG_KVFREE_RCU_BATCHED
> >>> ...
> >>> #else
> >>> struct kvfree_rcu_head {
> >>> struct rcu_head head;
> >>> };
> >>> #endif
> >>>
> >>> and everywhere add a cast everywhere that expects kvfree_rcu_head == rcu_head.
> >>>
> >>> but this would indeed be more complex :(
> >>
> >> So you mean like this? Doesn't seem so complex and seems to compile here
> >> with CONFIG_KVFREE_RCU_BATCHED both disabled and enabled.
> >
> > I thought that a lot more places have to be updated, but it looks from your diff
> > below that this is simple enough.
>
> Thanks. The slab/for-next branch now includes the slab changes.
The slab changes looks good to me, thanks!
--
Cheers,
Harry / Hyeonggon
prev parent reply other threads:[~2026-08-06 5:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260731122826.737703-1-spasswolf@web.de>
2026-07-31 19:25 ` rust compile failure in next-20260730 Nathan Chancellor
2026-08-03 13:57 ` Gary Guo
2026-08-03 14:23 ` Boqun Feng
2026-08-03 15:10 ` Vlastimil Babka (SUSE)
2026-08-03 15:32 ` Gary Guo
2026-08-03 21:04 ` Vlastimil Babka (SUSE)
2026-08-04 10:10 ` Gary Guo
2026-08-04 10:35 ` Vlastimil Babka (SUSE)
2026-08-05 16:24 ` Miguel Ojeda
2026-08-05 16:30 ` Vlastimil Babka (SUSE)
2026-08-05 16:31 ` Mark Brown
2026-08-06 5:52 ` Harry Yoo [this message]
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=anQftbfg8EWMmxZc@dev \
--to=harry@kernel.org \
--cc=aliceryhl@google.com \
--cc=boqun@kernel.org \
--cc=broonie@kernel.org \
--cc=gary@garyguo.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=spasswolf@web.de \
--cc=vbabka@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox