linux-next: manual merge of the slab tree with the rcu tree
Subsystems (3)
Mark Brown
maintainerHi all,
Today's linux-next merge of the slab tree got a conflict in:
mm/slab_common.c
between commit:
736084507faa3 ("rcu: Rename struct rcu_gp_oldstate to rcu_gp_seq")
from the rcu tree and commit:
bdd0cc9f0ffc3 ("mm/slab: introduce struct kvfree_rcu_head for kvfree_rcu batching")
from the slab tree.
I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
mm/slab_common.c +0 -0
@@@ -1363,8 -1420,8 +1420,8 @@@ struct kvfree_rcu_bulk_datastruct kfree_rcu_cpu_work {struct rcu_work rcu_work; -struct rcu_head *head_free; +struct kvfree_rcu_head *head_free; - struct rcu_gp_oldstate head_free_gp_snap; + struct rcu_gp_seq head_free_gp_snap;struct list_head bulk_head_free[FREE_N_CHANNELS ];struct kfree_rcu_cpu *krcp; };unsigned long flags;struct kvfree_rcu_bulk_data *bnode, *n;struct list_head bulk_head[FREE_N_CHANNELS ]; -struct rcu_head *head; +struct kvfree_rcu_head *head;struct kfree_rcu_cpu *krcp;struct kfree_rcu_cpu_work *krwp; - struct rcu_gp_oldstate head_gp_snap; + struct rcu_gp_seq head_gp_snap;int i; krwp = container_of(to_rcu_work(work),
Quoted 14 lines · Mark Brown
Hi all,
Today's linux-next merge of the slab tree got a conflict in:
mm/slab_common.cbetween commit:
736084507faa3("rcu: Rename structrcu_gp_oldstatetorcu_gp_seq")from the rcu tree and commit:
bdd0cc9f0ffc3("mm/slab: introduce structkvfree_rcu_headforkvfree_rcubatching")
Quoted 8 lines
from the slab tree.
I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
This resolution looks good to me, thank you!
Thanx, Paul
Quoted 28 lines
mm/slab_common.c +2
-2@@@ -1363,8 -1420,8 +1420,8 @@@ struct kvfree_rcu_bulk_datastruct kfree_rcu_cpu_work {struct rcu_work rcu_work; -struct rcu_head *head_free; +struct kvfree_rcu_head *head_free; - struct rcu_gp_oldstate head_free_gp_snap; + struct rcu_gp_seq head_free_gp_snap;struct list_head bulk_head_free[FREE_N_CHANNELS ];struct kfree_rcu_cpu *krcp; };@@@ -1569,10 -1626,10 +1626,10 @@@ static void kfree_rcu_work(struct work_unsigned long flags;struct kvfree_rcu_bulk_data *bnode, *n;struct list_head bulk_head[FREE_N_CHANNELS ]; -struct rcu_head *head; +struct kvfree_rcu_head *head;struct kfree_rcu_cpu *krcp;struct kfree_rcu_cpu_work *krwp; - struct rcu_gp_oldstate head_gp_snap; + struct rcu_gp_seq head_gp_snap;int i; krwp = container_of(to_rcu_work(work),
Quoted 7 lines · On Thu, 30 Jul 2026 15:38:48 +0100 Mark Brown <[email protected]> wrote:
Today's linux-next merge of the slab tree got a conflict in:
mm/slab_common.cbetween commit:
Quoted 7 lines
736084507faa3("rcu: Rename structrcu_gp_oldstatetorcu_gp_seq")from the rcu tree and commit:
bdd0cc9f0ffc3("mm/slab: introduce structkvfree_rcu_headforkvfree_rcubatching")from the slab tree.
The slab one semantically conflicts as well with commit:
e5e86df8b666 ("rust: poll: use kfree_rcu() for PollCondVar")
from the char-misc tree:
error[E0308]: mismatched types
--> rust/kernel/sync/poll.rs:175:44
|
175 | unsafe { bindings::kvfree_call_rcu((*ptr).rcu.get(), ptr.cast::<ffi::c_void>()) };
| ------------------------- ^^^^^^^^^^^^^^^^ expected `*mut kvfree_rcu_head`, found `*mut callback_head`
| |
| arguments to this function are incorrect
|
= note: expected raw pointer `*mut bindings::kvfree_rcu_head`
found raw pointer `*mut bindings::callback_head`
note: function defined here
--> rust/bindings/bindings_generated.rs:90407:12
|
90407 | pub fn kvfree_call_rcu(head: *mut kvfree_rcu_head, ptr: *mut ffi::c_void);
| ^^^^^^^^^^^^^^^The C API was not meant to have a visible effect, but we don't use the kvfree_rcu() macro, so we notice the change. We can add a similar cast to the C side:
diff --git a/rust/kernel/sync/poll.rs b/rust/kernel/sync/poll.rs
index 684dfa242b1a..79d7e08215b0 100644
--- a/rust/kernel/sync/poll.rs
+++ b/rust/kernel/sync/poll.rs
@@ -172,6 +172,6 @@ fn drop(&mut self) {
unsafe { bindings::__wake_up_pollfree((*ptr).inner.inner.wait_queue_head.get()) };
// SAFETY: This was allocated using `KBox::pin_init`, so it can be freed with `kvfree`.
- unsafe { bindings::kvfree_call_rcu((*ptr).rcu.get(), ptr.cast::<ffi::c_void>()) };
+ unsafe { bindings::kvfree_call_rcu((*ptr).rcu.get().cast(), ptr.cast::<ffi::c_void>()) };
}
}Clippy doesn't complain about the "unneeded" cast() under CONFIG_KVFREE_RCU_BATCHED=n, so it should be fine.
Cheers,
Miguel
Vlastimil Babka (SUSE)
maintainerQuoted 55 lines · Miguel Ojeda
Quoted 7 lines · On Thu, 30 Jul 2026 15:38:48 +0100 Mark Brown <[email protected]> wrote:
Today's linux-next merge of the slab tree got a conflict in:
mm/slab_common.cbetween commit:
Quoted 7 lines
736084507faa3("rcu: Rename structrcu_gp_oldstatetorcu_gp_seq")from the rcu tree and commit:
bdd0cc9f0ffc3("mm/slab: introduce structkvfree_rcu_headforkvfree_rcubatching")from the slab tree.
The slab one semantically conflicts as well with commit:
e5e86df8b666("rust: poll: usekfree_rcu()for PollCondVar")from the char-misc tree:
error[E0308]: mismatched types --> rust/kernel/sync/poll.rs:175:44 | 175 | unsafe { bindings::kvfree_call_rcu((*ptr).rcu.get(), ptr.cast::<ffi::c_void>()) }; | ------------------------- ^^^^^^^^^^^^^^^^ expected `*mut kvfree_rcu_head`, found `*mut callback_head` | | | arguments to this function are incorrect | = note: expected raw pointer `*mut bindings::kvfree_rcu_head` found raw pointer `*mut bindings::callback_head` note: function defined here --> rust/bindings/bindings_generated.rs:90407:12 | 90407 | pub fn kvfree_call_rcu(head: *mut kvfree_rcu_head, ptr: *mut ffi::c_void); | ^^^^^^^^^^^^^^^The C API was not meant to have a visible effect, but we don't use the
kvfree_rcu()macro, so we notice the change. We can add a similar cast to the C side:diff --git a/rust/kernel/sync/poll.rs b/rust/kernel/sync/poll.rs index 684dfa242b1a..79d7e08215b0 100644 --- a/rust/kernel/sync/poll.rs +++ b/rust/kernel/sync/poll.rs @@ -172,6 +172,6 @@ fn drop(&mut self) { unsafe { bindings::__wake_up_pollfree((*ptr).inner.inner.wait_queue_head.get()) }; // SAFETY: This was allocated using `KBox::pin_init`, so it can be freed with `kvfree`. - unsafe { bindings::kvfree_call_rcu((*ptr).rcu.get(), ptr.cast::<ffi::c_void>()) }; + unsafe { bindings::kvfree_call_rcu((*ptr).rcu.get().cast(), ptr.cast::<ffi::c_void>()) }; } }
Quoted 2 lines
Clippy doesn't complain about the "unneeded"
cast()underCONFIG_KVFREE_RCU_BATCHED=n, so it should be fine.
Thanks! Should I thus amend bdd0cc9f0ffc3 ("mm/slab: introduce struct kvfree_rcu_head for kvfree_rcu batching") with this fixup or you'll do that in the char-misc tree?
Quoted 8 lines
Cc Alice Ryhl <[email protected]>Cc Boqun Feng <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Harry Yoo (Oracle) <[email protected]>Cc Vlastimil Babka (SUSE) <[email protected]>Cheers,
Miguel
Vlastimil Babka (SUSE)
maintainerQuoted 56 lines · Vlastimil Babka (SUSE)
Quoted 55 lines · Miguel Ojeda
Quoted 7 lines · On Thu, 30 Jul 2026 15:38:48 +0100 Mark Brown <[email protected]> wrote:
Today's linux-next merge of the slab tree got a conflict in:
mm/slab_common.cbetween commit:
Quoted 7 lines
736084507faa3("rcu: Rename structrcu_gp_oldstatetorcu_gp_seq")from the rcu tree and commit:
bdd0cc9f0ffc3("mm/slab: introduce structkvfree_rcu_headforkvfree_rcubatching")from the slab tree.
The slab one semantically conflicts as well with commit:
e5e86df8b666("rust: poll: usekfree_rcu()for PollCondVar")from the char-misc tree:
error[E0308]: mismatched types --> rust/kernel/sync/poll.rs:175:44 | 175 | unsafe { bindings::kvfree_call_rcu((*ptr).rcu.get(), ptr.cast::<ffi::c_void>()) }; | ------------------------- ^^^^^^^^^^^^^^^^ expected `*mut kvfree_rcu_head`, found `*mut callback_head` | | | arguments to this function are incorrect | = note: expected raw pointer `*mut bindings::kvfree_rcu_head` found raw pointer `*mut bindings::callback_head` note: function defined here --> rust/bindings/bindings_generated.rs:90407:12 | 90407 | pub fn kvfree_call_rcu(head: *mut kvfree_rcu_head, ptr: *mut ffi::c_void); | ^^^^^^^^^^^^^^^The C API was not meant to have a visible effect, but we don't use the
kvfree_rcu()macro, so we notice the change. We can add a similar cast to the C side:diff --git a/rust/kernel/sync/poll.rs b/rust/kernel/sync/poll.rs index 684dfa242b1a..79d7e08215b0 100644 --- a/rust/kernel/sync/poll.rs +++ b/rust/kernel/sync/poll.rs @@ -172,6 +172,6 @@ fn drop(&mut self) { unsafe { bindings::__wake_up_pollfree((*ptr).inner.inner.wait_queue_head.get()) }; // SAFETY: This was allocated using `KBox::pin_init`, so it can be freed with `kvfree`. - unsafe { bindings::kvfree_call_rcu((*ptr).rcu.get(), ptr.cast::<ffi::c_void>()) }; + unsafe { bindings::kvfree_call_rcu((*ptr).rcu.get().cast(), ptr.cast::<ffi::c_void>()) }; } }
Quoted 6 lines
Quoted 2 lines
Clippy doesn't complain about the "unneeded"
cast()underCONFIG_KVFREE_RCU_BATCHED=n, so it should be fine.Thanks! Should I thus amend
bdd0cc9f0ffc3("mm/slab: introduce structkvfree_rcu_headforkvfree_rcubatching") with this fixup or you'll do that in the char-misc tree?
I see, it has to be in char-misc which introduces that patched code, we don't have it.
Quoted 9 lines
Quoted 8 lines
Cc Alice Ryhl <[email protected]>Cc Boqun Feng <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Harry Yoo (Oracle) <[email protected]>Cc Vlastimil Babka (SUSE) <[email protected]>Cheers,
Miguel
Quoted 55 lines · Miguel Ojeda
Quoted 7 lines · On Thu, 30 Jul 2026 15:38:48 +0100 Mark Brown <[email protected]> wrote:
Today's linux-next merge of the slab tree got a conflict in:
mm/slab_common.cbetween commit:
Quoted 7 lines
736084507faa3("rcu: Rename structrcu_gp_oldstatetorcu_gp_seq")from the rcu tree and commit:
bdd0cc9f0ffc3("mm/slab: introduce structkvfree_rcu_headforkvfree_rcubatching")from the slab tree.
The slab one semantically conflicts as well with commit:
e5e86df8b666("rust: poll: usekfree_rcu()for PollCondVar")from the char-misc tree:
error[E0308]: mismatched types --> rust/kernel/sync/poll.rs:175:44 | 175 | unsafe { bindings::kvfree_call_rcu((*ptr).rcu.get(), ptr.cast::<ffi::c_void>()) }; | ------------------------- ^^^^^^^^^^^^^^^^ expected `*mut kvfree_rcu_head`, found `*mut callback_head` | | | arguments to this function are incorrect | = note: expected raw pointer `*mut bindings::kvfree_rcu_head` found raw pointer `*mut bindings::callback_head` note: function defined here --> rust/bindings/bindings_generated.rs:90407:12 | 90407 | pub fn kvfree_call_rcu(head: *mut kvfree_rcu_head, ptr: *mut ffi::c_void); | ^^^^^^^^^^^^^^^The C API was not meant to have a visible effect, but we don't use the
kvfree_rcu()macro, so we notice the change. We can add a similar cast to the C side:diff --git a/rust/kernel/sync/poll.rs b/rust/kernel/sync/poll.rs index 684dfa242b1a..79d7e08215b0 100644 --- a/rust/kernel/sync/poll.rs +++ b/rust/kernel/sync/poll.rs @@ -172,6 +172,6 @@ fn drop(&mut self) { unsafe { bindings::__wake_up_pollfree((*ptr).inner.inner.wait_queue_head.get()) }; // SAFETY: This was allocated using `KBox::pin_init`, so it can be freed with `kvfree`. - unsafe { bindings::kvfree_call_rcu((*ptr).rcu.get(), ptr.cast::<ffi::c_void>()) }; + unsafe { bindings::kvfree_call_rcu((*ptr).rcu.get().cast(), ptr.cast::<ffi::c_void>()) }; } }
Quoted 9 lines
Clippy doesn't complain about the "unneeded"
cast()underCONFIG_KVFREE_RCU_BATCHED=n, so it should be fine.Cc Alice Ryhl <[email protected]>Cc Boqun Feng <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Harry Yoo (Oracle) <[email protected]>Cc Vlastimil Babka (SUSE) <[email protected]>
Cc Nathan & Bert because of:
https://lore.kernel.org/rust-for-linux/20260731192522.GA1014697@ax162/
I actually prefer Nathan's fix, since it's more explicit about the kvfree_rcu_head requirement. Alice & Miguel, thoughts?
Regards,
Boqun
Quoted 2 lines
Cheers,
Miguel
Quoted 7 lines · Boqun Feng
Cc Nathan & Bert because of:
https://lore.kernel.org/rust-for-linux/20260731192522.GA1014697@ax162/I actually prefer Nathan's fix, since it's more explicit about the
kvfree_rcu_headrequirement. Alice & Miguel, thoughts?
I like having the right types as a general principle, but I guess it depends on whether the maintainers prefer a solution closer in spirit to the cast in the C macro and whether the plan is indeed to have later more invasive changes / user-visible changes etc.
Another solution could be to have C helpers on the more public facing API, but I assume there was a reason not to even before this change, e.g. expensive.
Cheers,
Miguel
Quoted 67 lines · Boqun Feng
Quoted 55 lines · Miguel Ojeda
Quoted 7 lines · On Thu, 30 Jul 2026 15:38:48 +0100 Mark Brown <[email protected]> wrote:
Today's linux-next merge of the slab tree got a conflict in:
mm/slab_common.cbetween commit:
Quoted 7 lines
736084507faa3("rcu: Rename structrcu_gp_oldstatetorcu_gp_seq")from the rcu tree and commit:
bdd0cc9f0ffc3("mm/slab: introduce structkvfree_rcu_headforkvfree_rcubatching")from the slab tree.
The slab one semantically conflicts as well with commit:
e5e86df8b666("rust: poll: usekfree_rcu()for PollCondVar")from the char-misc tree:
error[E0308]: mismatched types --> rust/kernel/sync/poll.rs:175:44 | 175 | unsafe { bindings::kvfree_call_rcu((*ptr).rcu.get(), ptr.cast::<ffi::c_void>()) }; | ------------------------- ^^^^^^^^^^^^^^^^ expected `*mut kvfree_rcu_head`, found `*mut callback_head` | | | arguments to this function are incorrect | = note: expected raw pointer `*mut bindings::kvfree_rcu_head` found raw pointer `*mut bindings::callback_head` note: function defined here --> rust/bindings/bindings_generated.rs:90407:12 | 90407 | pub fn kvfree_call_rcu(head: *mut kvfree_rcu_head, ptr: *mut ffi::c_void); | ^^^^^^^^^^^^^^^The C API was not meant to have a visible effect, but we don't use the
kvfree_rcu()macro, so we notice the change. We can add a similar cast to the C side:diff --git a/rust/kernel/sync/poll.rs b/rust/kernel/sync/poll.rs index 684dfa242b1a..79d7e08215b0 100644 --- a/rust/kernel/sync/poll.rs +++ b/rust/kernel/sync/poll.rs @@ -172,6 +172,6 @@ fn drop(&mut self) { unsafe { bindings::__wake_up_pollfree((*ptr).inner.inner.wait_queue_head.get()) }; // SAFETY: This was allocated using `KBox::pin_init`, so it can be freed with `kvfree`. - unsafe { bindings::kvfree_call_rcu((*ptr).rcu.get(), ptr.cast::<ffi::c_void>()) }; + unsafe { bindings::kvfree_call_rcu((*ptr).rcu.get().cast(), ptr.cast::<ffi::c_void>()) }; } }Quoted 9 lines
Clippy doesn't complain about the "unneeded"
cast()underCONFIG_KVFREE_RCU_BATCHED=n, so it should be fine.Cc Alice Ryhl <[email protected]>Cc Boqun Feng <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Harry Yoo (Oracle) <[email protected]>Cc Vlastimil Babka (SUSE) <[email protected]>
Quoted 6 lines
Cc Nathan & Bert because of:
https://lore.kernel.org/rust-for-linux/20260731192522.GA1014697@ax162/I actually prefer Nathan's fix, since it's more explicit about the
kvfree_rcu_headrequirement. Alice & Miguel, thoughts?
I like Nathan's fix as well.
Not sure if it needs to be done in the merge commit, or if we can apply it as a patch to char-misc despite the unknown CFG_*?
Alice
Quoted 4 lines · Alice Ryhl
I like Nathan's fix as well.
Not sure if it needs to be done in the merge commit, or if we can apply it as a patch to char-misc despite the unknown CFG_*?
It would need to be applied at the merge of the two trees because CONFIG_KVFREE_RCU_BATCHED was introduced back in 6.15 in commit c9f8f1242a4c ("slab: don't batch kvfree_rcu() with SLUB_TINY").
Signature · 2 lines
Cheers, Nathan
Harry Yoo
maintainerQuoted 24 lines · Paul E. McKenney
Quoted 14 lines · Mark Brown
Hi all,
Today's linux-next merge of the slab tree got a conflict in:
mm/slab_common.cbetween commit:
736084507faa3("rcu: Rename structrcu_gp_oldstatetorcu_gp_seq")from the rcu tree and commit:
bdd0cc9f0ffc3("mm/slab: introduce structkvfree_rcu_headforkvfree_rcubatching")Quoted 8 lines
from the slab tree.
I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
Quoted 4 lines
This resolution looks good to me, thank you!
Thanx, Paul
Looks good to me too, thanks!
Signature · 2 lines
Cheers, Harry / Hyeonggon
Harry Yoo
maintainerQuoted 2 lines · Nathan Chancellor
Quoted 1 line · Alice Ryhl
I like Nathan's fix as well.
I don't really have a strong preference this, and it would be appropriate to fix this in a way Rust folks would prefer...
Quoted 6 lines
Quoted 2 lines
Not sure if it needs to be done in the merge commit, or if we can apply it as a patch to char-misc despite the unknown CFG_*?
It would need to be applied at the merge of the two trees because
CONFIG_KVFREE_RCU_BATCHEDwas introduced back in 6.15 in commitc9f8f1242a4c("slab: don't batchkvfree_rcu()withSLUB_TINY").
What do we do when it needs to be fixed in the merge commit, mention this in the pull request email?
Signature · 2 lines
Cheers, Harry / Hyeonggon
Quoted 3 lines · Harry Yoo
What do we do when it needs to be fixed in the merge commit, mention this in the pull request email?
Yeah, it is also good to make sure the resolutions in linux-next are good, so that they serve as a point of reference and so that linux-next is testable etc.
Cheers,
Miguel
Harry Yoo
maintainerQuoted 8 lines · Miguel Ojeda
Quoted 3 lines · Harry Yoo
What do we do when it needs to be fixed in the merge commit, mention this in the pull request email?
Yeah, it is also good to make sure the resolutions in linux-next are good, so that they serve as a point of reference and so that linux-next is testable etc.
Makes sense, thanks for explaining Miguel!
Quoted 2 lines
Cheers,
Miguel
Signature · 2 lines
Cheers, Harry / Hyeonggon
Quoted 2 lines · Harry Yoo
Makes sense, thanks for explaining Miguel!
You're welcome, it is nothing of course :)
(I forgot to mention that in your PR you may want to mention the linux-next resolution to Linus explicitly -- he usually appreciates those)
If it gives trouble, please let me know and I am happy to help.
Cheers,
Miguel
Vlastimil Babka (SUSE)
maintainerQuoted 6 lines · Harry Yoo
Quoted 2 lines · Nathan Chancellor
Quoted 1 line · Alice Ryhl
I like Nathan's fix as well.
I don't really have a strong preference this, and it would be appropriate to fix this in a way Rust folks would prefer...
It should be also possible to apply Miguel's fix immediately in the char-misc tree, and then changing it to Nathan's fix as a followup clean-up after both trees are mainline?
Quoted 10 lines
Quoted 6 lines
Quoted 2 lines
Not sure if it needs to be done in the merge commit, or if we can apply it as a patch to char-misc despite the unknown CFG_*?
It would need to be applied at the merge of the two trees because
CONFIG_KVFREE_RCU_BATCHEDwas introduced back in 6.15 in commitc9f8f1242a4c("slab: don't batchkvfree_rcu()withSLUB_TINY").What do we do when it needs to be fixed in the merge commit, mention this in the pull request email?
Quoted 9 lines · Nathan Chancellor
Quoted 4 lines · Alice Ryhl
I like Nathan's fix as well.
Not sure if it needs to be done in the merge commit, or if we can apply it as a patch to char-misc despite the unknown CFG_*?
It would need to be applied at the merge of the two trees because
CONFIG_KVFREE_RCU_BATCHEDwas introduced back in 6.15 in commitc9f8f1242a4c("slab: don't batchkvfree_rcu()withSLUB_TINY").
Is that required? Yes, the cfg(CONFIG_KVFREE_RCU_BATCHED) will fail in Greg's tree because the CFG doesn't exist and is hence not enabled ... but the cfg not applying is what we want.
The main risk I can think of is a warning about an unknown CFG being used. Perhaps we could silence the warning?
Or I mean, we can also just fix it in the merge commit if that works for everyone.
Alice
Vlastimil Babka (SUSE)
maintainerQuoted 7 lines · Alice Ryhl
Quoted 6 lines · Nathan Chancellor
Quoted 4 lines · Alice Ryhl
I like Nathan's fix as well.
Not sure if it needs to be done in the merge commit, or if we can apply it as a patch to char-misc despite the unknown CFG_*?
Quoted 7 lines
Quoted 3 lines
It would need to be applied at the merge of the two trees because
CONFIG_KVFREE_RCU_BATCHEDwas introduced back in 6.15 in commitc9f8f1242a4c("slab: don't batchkvfree_rcu()withSLUB_TINY").Is that required? Yes, the
cfg(CONFIG_KVFREE_RCU_BATCHED)will fail in Greg's tree because the CFG doesn't exist and is hence not enabled ... but the cfg not applying is what we want.
But it does exist, CONFIG_KVFREE_RCU_BATCHED itself is old. What's new in slab tree is kvfree_call_rcu() taking a "struct kvfree_rcu_head *" parameter instead of "struct rcu_head *head" (which is actually "callback_head").
With Gary's suggestion [1] CONFIG_KVFREE_RCU_BATCHED will go out of the picture completely anyway. What remains is an unconditional change of the parameter. Can it be "resolved in advance" or only in the merge commit?
https://lore.kernel.org/all/[email protected]/
Quoted 7 lines
The main risk I can think of is a warning about an unknown CFG being used. Perhaps we could silence the warning?
Or I mean, we can also just fix it in the merge commit if that works for everyone.
Alice
Quoted 6 lines · Vlastimil Babka (SUSE)
With Gary's suggestion [1]
CONFIG_KVFREE_RCU_BATCHEDwill go out of the picture completely anyway. What remains is an unconditional change of the parameter. Can it be "resolved in advance" or only in the merge commit?
Hmm... I am not sure I follow why we are trying to resolve these things in advance.
Semantic conflicts can be painful because they can be easily forgotten about, but as long as it is warned about when doing the pull (and making sure linux-next has the wanted resolution), it should be fine -- branches can still be independent.
Now, if for some reason one really wants to solve the conflict on one of the sides, then one can do a merge commit and justify it well. The diffs proposed here seem small, so I am not sure why we would want that. Usually what Linus prefers is to give him that merge in another branch for reference, rather than sending the merge itself.
What I would avoid is adding a workaround that requires knowing about the "future" (like depending on an unknown cfg, assuming it was unknown). Sometimes we do that (e.g. when building features), but it isn't really the case here...
Cheers,
Miguel
Vlastimil Babka (SUSE)
maintainerQuoted 9 lines · Miguel Ojeda
Quoted 6 lines · Vlastimil Babka (SUSE)
With Gary's suggestion [1]
CONFIG_KVFREE_RCU_BATCHEDwill go out of the picture completely anyway. What remains is an unconditional change of the parameter. Can it be "resolved in advance" or only in the merge commit?
Quoted 7 lines
Hmm... I am not sure I follow why we are trying to resolve these things in advance.
Semantic conflicts can be painful because they can be easily forgotten about, but as long as it is warned about when doing the pull (and making sure linux-next has the wanted resolution), it should be fine -- branches can still be independent.
Alright, let's leave it to the merge commit then. The slab side was updated to allow the simple merge commit resolution Gary suggested. It's better than relying on the #define in any case.
https://lore.kernel.org/all/[email protected]/
Quoted 13 lines
Now, if for some reason one really wants to solve the conflict on one of the sides, then one can do a merge commit and justify it well. The diffs proposed here seem small, so I am not sure why we would want that. Usually what Linus prefers is to give him that merge in another branch for reference, rather than sending the merge itself.
What I would avoid is adding a workaround that requires knowing about the "future" (like depending on an unknown
cfg, assuming it was unknown). Sometimes we do that (e.g. when building features), but it isn't really the case here...Cheers,
Miguel