* [PATCH] mm/slab: stop exporting kvfree_rcu_barrier[_on_cache]()
@ 2026-07-30 14:32 Vlastimil Babka (SUSE)
2026-07-30 20:59 ` Paul E. McKenney
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Vlastimil Babka (SUSE) @ 2026-07-30 14:32 UTC (permalink / raw)
To: Harry Yoo, Andrew Morton
Cc: Hao Li, Uladzislau Rezki, Christoph Lameter, David Rientjes,
Roman Gushchin, linux-mm, rcu, linux-kernel,
Vlastimil Babka (SUSE)
No module code calls these functions directly. Seems it was always the
case. Remove the exports.
Signed-off-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
---
Based on slab/for-7.3/kfree_rcu_nolock
---
mm/slab_common.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/mm/slab_common.c b/mm/slab_common.c
index 6750dfa27367..cd155ffc2762 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -1329,14 +1329,12 @@ void kvfree_rcu_barrier(void)
deferred_work_barrier();
rcu_barrier();
}
-EXPORT_SYMBOL_GPL(kvfree_rcu_barrier);
void kvfree_rcu_barrier_on_cache(struct kmem_cache *s)
{
deferred_work_barrier();
rcu_barrier();
}
-EXPORT_SYMBOL_GPL(kvfree_rcu_barrier_on_cache);
void __init kvfree_rcu_init(void)
{
@@ -2163,7 +2161,6 @@ void kvfree_rcu_barrier(void)
flush_all_rcu_sheaves();
__kvfree_rcu_barrier();
}
-EXPORT_SYMBOL_GPL(kvfree_rcu_barrier);
/**
* kvfree_rcu_barrier_on_cache - Wait for in-flight kvfree_rcu() calls on a
@@ -2186,7 +2183,6 @@ void kvfree_rcu_barrier_on_cache(struct kmem_cache *s)
rcu_barrier();
__kvfree_rcu_barrier();
}
-EXPORT_SYMBOL_GPL(kvfree_rcu_barrier_on_cache);
static unsigned long
kfree_rcu_shrink_count(struct shrinker *shrink, struct shrink_control *sc)
---
base-commit: b01f6ed9ff0c4581fc669044fa5b82a93b4ef144
change-id: 20260730-unexport-barriers-439b3f69f791
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] mm/slab: stop exporting kvfree_rcu_barrier[_on_cache]()
2026-07-30 14:32 [PATCH] mm/slab: stop exporting kvfree_rcu_barrier[_on_cache]() Vlastimil Babka (SUSE)
@ 2026-07-30 20:59 ` Paul E. McKenney
2026-08-03 7:59 ` Vlastimil Babka (SUSE)
2026-08-01 12:51 ` Harry Yoo
2026-08-03 8:01 ` Vlastimil Babka (SUSE)
2 siblings, 1 reply; 7+ messages in thread
From: Paul E. McKenney @ 2026-07-30 20:59 UTC (permalink / raw)
To: Vlastimil Babka (SUSE)
Cc: Harry Yoo, Andrew Morton, Hao Li, Uladzislau Rezki,
Christoph Lameter, David Rientjes, Roman Gushchin, linux-mm, rcu,
linux-kernel
On Thu, Jul 30, 2026 at 04:32:46PM +0200, Vlastimil Babka (SUSE) wrote:
> No module code calls these functions directly. Seems it was always the
> case. Remove the exports.
>
> Signed-off-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
Acked-by: Paul E. McKenney <paulmck@kernel.org>
Which reminds me... Are you guys interested in taking the kfree_rcu()
test code from kernel/rcu/rcuscale.c? See for example the kfree_rcu_test
module parameter.
Thanx, Paul
> ---
> Based on slab/for-7.3/kfree_rcu_nolock
> ---
> mm/slab_common.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/mm/slab_common.c b/mm/slab_common.c
> index 6750dfa27367..cd155ffc2762 100644
> --- a/mm/slab_common.c
> +++ b/mm/slab_common.c
> @@ -1329,14 +1329,12 @@ void kvfree_rcu_barrier(void)
> deferred_work_barrier();
> rcu_barrier();
> }
> -EXPORT_SYMBOL_GPL(kvfree_rcu_barrier);
>
> void kvfree_rcu_barrier_on_cache(struct kmem_cache *s)
> {
> deferred_work_barrier();
> rcu_barrier();
> }
> -EXPORT_SYMBOL_GPL(kvfree_rcu_barrier_on_cache);
>
> void __init kvfree_rcu_init(void)
> {
> @@ -2163,7 +2161,6 @@ void kvfree_rcu_barrier(void)
> flush_all_rcu_sheaves();
> __kvfree_rcu_barrier();
> }
> -EXPORT_SYMBOL_GPL(kvfree_rcu_barrier);
>
> /**
> * kvfree_rcu_barrier_on_cache - Wait for in-flight kvfree_rcu() calls on a
> @@ -2186,7 +2183,6 @@ void kvfree_rcu_barrier_on_cache(struct kmem_cache *s)
> rcu_barrier();
> __kvfree_rcu_barrier();
> }
> -EXPORT_SYMBOL_GPL(kvfree_rcu_barrier_on_cache);
>
> static unsigned long
> kfree_rcu_shrink_count(struct shrinker *shrink, struct shrink_control *sc)
>
> ---
> base-commit: b01f6ed9ff0c4581fc669044fa5b82a93b4ef144
> change-id: 20260730-unexport-barriers-439b3f69f791
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mm/slab: stop exporting kvfree_rcu_barrier[_on_cache]()
2026-07-30 14:32 [PATCH] mm/slab: stop exporting kvfree_rcu_barrier[_on_cache]() Vlastimil Babka (SUSE)
2026-07-30 20:59 ` Paul E. McKenney
@ 2026-08-01 12:51 ` Harry Yoo
2026-08-03 8:01 ` Vlastimil Babka (SUSE)
2 siblings, 0 replies; 7+ messages in thread
From: Harry Yoo @ 2026-08-01 12:51 UTC (permalink / raw)
To: Vlastimil Babka (SUSE)
Cc: Andrew Morton, Hao Li, Uladzislau Rezki, Christoph Lameter,
David Rientjes, Roman Gushchin, linux-mm, rcu, linux-kernel
On Thu, Jul 30, 2026 at 04:32:46PM +0200, Vlastimil Babka (SUSE) wrote:
> No module code calls these functions directly. Seems it was always the
> case. Remove the exports.
>
> Signed-off-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
> ---
Looks good to me,
Reviewed-by: Harry Yoo <harry@kernel.org>
--
Cheers,
Harry / Hyeonggon
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mm/slab: stop exporting kvfree_rcu_barrier[_on_cache]()
2026-07-30 20:59 ` Paul E. McKenney
@ 2026-08-03 7:59 ` Vlastimil Babka (SUSE)
2026-08-03 12:26 ` Harry Yoo
0 siblings, 1 reply; 7+ messages in thread
From: Vlastimil Babka (SUSE) @ 2026-08-03 7:59 UTC (permalink / raw)
To: paulmck
Cc: Harry Yoo, Andrew Morton, Hao Li, Uladzislau Rezki,
Christoph Lameter, David Rientjes, Roman Gushchin, linux-mm, rcu,
linux-kernel
On 7/30/26 22:59, Paul E. McKenney wrote:
> On Thu, Jul 30, 2026 at 04:32:46PM +0200, Vlastimil Babka (SUSE) wrote:
>> No module code calls these functions directly. Seems it was always the
>> case. Remove the exports.
>>
>> Signed-off-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
>
> Acked-by: Paul E. McKenney <paulmck@kernel.org>
Thanks!
> Which reminds me... Are you guys interested in taking the kfree_rcu()
> test code from kernel/rcu/rcuscale.c? See for example the kfree_rcu_test
> module parameter.
Hmm, we have a slub kunit test, but I think no such torture/scaling test
infra. Maybe once we have that? What do you think, Harry?
> Thanx, Paul
>
>> ---
>> Based on slab/for-7.3/kfree_rcu_nolock
>> ---
>> mm/slab_common.c | 4 ----
>> 1 file changed, 4 deletions(-)
>>
>> diff --git a/mm/slab_common.c b/mm/slab_common.c
>> index 6750dfa27367..cd155ffc2762 100644
>> --- a/mm/slab_common.c
>> +++ b/mm/slab_common.c
>> @@ -1329,14 +1329,12 @@ void kvfree_rcu_barrier(void)
>> deferred_work_barrier();
>> rcu_barrier();
>> }
>> -EXPORT_SYMBOL_GPL(kvfree_rcu_barrier);
>>
>> void kvfree_rcu_barrier_on_cache(struct kmem_cache *s)
>> {
>> deferred_work_barrier();
>> rcu_barrier();
>> }
>> -EXPORT_SYMBOL_GPL(kvfree_rcu_barrier_on_cache);
>>
>> void __init kvfree_rcu_init(void)
>> {
>> @@ -2163,7 +2161,6 @@ void kvfree_rcu_barrier(void)
>> flush_all_rcu_sheaves();
>> __kvfree_rcu_barrier();
>> }
>> -EXPORT_SYMBOL_GPL(kvfree_rcu_barrier);
>>
>> /**
>> * kvfree_rcu_barrier_on_cache - Wait for in-flight kvfree_rcu() calls on a
>> @@ -2186,7 +2183,6 @@ void kvfree_rcu_barrier_on_cache(struct kmem_cache *s)
>> rcu_barrier();
>> __kvfree_rcu_barrier();
>> }
>> -EXPORT_SYMBOL_GPL(kvfree_rcu_barrier_on_cache);
>>
>> static unsigned long
>> kfree_rcu_shrink_count(struct shrinker *shrink, struct shrink_control *sc)
>>
>> ---
>> base-commit: b01f6ed9ff0c4581fc669044fa5b82a93b4ef144
>> change-id: 20260730-unexport-barriers-439b3f69f791
>>
>>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mm/slab: stop exporting kvfree_rcu_barrier[_on_cache]()
2026-07-30 14:32 [PATCH] mm/slab: stop exporting kvfree_rcu_barrier[_on_cache]() Vlastimil Babka (SUSE)
2026-07-30 20:59 ` Paul E. McKenney
2026-08-01 12:51 ` Harry Yoo
@ 2026-08-03 8:01 ` Vlastimil Babka (SUSE)
2 siblings, 0 replies; 7+ messages in thread
From: Vlastimil Babka (SUSE) @ 2026-08-03 8:01 UTC (permalink / raw)
To: Harry Yoo, Andrew Morton
Cc: Hao Li, Uladzislau Rezki, Christoph Lameter, David Rientjes,
Roman Gushchin, linux-mm, rcu, linux-kernel
On 7/30/26 16:32, Vlastimil Babka (SUSE) wrote:
> No module code calls these functions directly. Seems it was always the
> case. Remove the exports.
>
> Signed-off-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
> ---
> Based on slab/for-7.3/kfree_rcu_nolock
Applied to that branch and slab/for-next
> ---
> mm/slab_common.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/mm/slab_common.c b/mm/slab_common.c
> index 6750dfa27367..cd155ffc2762 100644
> --- a/mm/slab_common.c
> +++ b/mm/slab_common.c
> @@ -1329,14 +1329,12 @@ void kvfree_rcu_barrier(void)
> deferred_work_barrier();
> rcu_barrier();
> }
> -EXPORT_SYMBOL_GPL(kvfree_rcu_barrier);
>
> void kvfree_rcu_barrier_on_cache(struct kmem_cache *s)
> {
> deferred_work_barrier();
> rcu_barrier();
> }
> -EXPORT_SYMBOL_GPL(kvfree_rcu_barrier_on_cache);
>
> void __init kvfree_rcu_init(void)
> {
> @@ -2163,7 +2161,6 @@ void kvfree_rcu_barrier(void)
> flush_all_rcu_sheaves();
> __kvfree_rcu_barrier();
> }
> -EXPORT_SYMBOL_GPL(kvfree_rcu_barrier);
>
> /**
> * kvfree_rcu_barrier_on_cache - Wait for in-flight kvfree_rcu() calls on a
> @@ -2186,7 +2183,6 @@ void kvfree_rcu_barrier_on_cache(struct kmem_cache *s)
> rcu_barrier();
> __kvfree_rcu_barrier();
> }
> -EXPORT_SYMBOL_GPL(kvfree_rcu_barrier_on_cache);
>
> static unsigned long
> kfree_rcu_shrink_count(struct shrinker *shrink, struct shrink_control *sc)
>
> ---
> base-commit: b01f6ed9ff0c4581fc669044fa5b82a93b4ef144
> change-id: 20260730-unexport-barriers-439b3f69f791
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mm/slab: stop exporting kvfree_rcu_barrier[_on_cache]()
2026-08-03 7:59 ` Vlastimil Babka (SUSE)
@ 2026-08-03 12:26 ` Harry Yoo
2026-08-03 15:37 ` Paul E. McKenney
0 siblings, 1 reply; 7+ messages in thread
From: Harry Yoo @ 2026-08-03 12:26 UTC (permalink / raw)
To: Vlastimil Babka (SUSE)
Cc: paulmck, Andrew Morton, Hao Li, Uladzislau Rezki,
Christoph Lameter, David Rientjes, Roman Gushchin, linux-mm, rcu,
linux-kernel
On Mon, Aug 03, 2026 at 09:59:44AM +0200, Vlastimil Babka (SUSE) wrote:
> On 7/30/26 22:59, Paul E. McKenney wrote:
> > On Thu, Jul 30, 2026 at 04:32:46PM +0200, Vlastimil Babka (SUSE) wrote:
> > Which reminds me... Are you guys interested in taking the kfree_rcu()
> > test code from kernel/rcu/rcuscale.c? See for example the kfree_rcu_test
> > module parameter.
>
> Hmm, we have a slub kunit test, but I think no such torture/scaling test
> infra. Maybe once we have that? What do you think, Harry?
That'd be definitely useful. We have been reviving performance tests
every time we wondered if it'd affect performance in a surprising way.
But we've never put that in the mainline ;)
Probably test_kmalloc_nolock_and_friends*() don't even belong
slub_kunit.
Perhaps worth starting small with lib/test_slab.c, and slowly
move/add torture/scaling tests to there?
--
Cheers,
Harry / Hyeonggon
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mm/slab: stop exporting kvfree_rcu_barrier[_on_cache]()
2026-08-03 12:26 ` Harry Yoo
@ 2026-08-03 15:37 ` Paul E. McKenney
0 siblings, 0 replies; 7+ messages in thread
From: Paul E. McKenney @ 2026-08-03 15:37 UTC (permalink / raw)
To: Harry Yoo
Cc: Vlastimil Babka (SUSE), Andrew Morton, Hao Li, Uladzislau Rezki,
Christoph Lameter, David Rientjes, Roman Gushchin, linux-mm, rcu,
linux-kernel
On Mon, Aug 03, 2026 at 12:26:55PM +0000, Harry Yoo wrote:
> On Mon, Aug 03, 2026 at 09:59:44AM +0200, Vlastimil Babka (SUSE) wrote:
> > On 7/30/26 22:59, Paul E. McKenney wrote:
> > > On Thu, Jul 30, 2026 at 04:32:46PM +0200, Vlastimil Babka (SUSE) wrote:
> > > Which reminds me... Are you guys interested in taking the kfree_rcu()
> > > test code from kernel/rcu/rcuscale.c? See for example the kfree_rcu_test
> > > module parameter.
> >
> > Hmm, we have a slub kunit test, but I think no such torture/scaling test
> > infra. Maybe once we have that? What do you think, Harry?
>
> That'd be definitely useful. We have been reviving performance tests
> every time we wondered if it'd affect performance in a surprising way.
> But we've never put that in the mainline ;)
>
> Probably test_kmalloc_nolock_and_friends*() don't even belong
> slub_kunit.
>
> Perhaps worth starting small with lib/test_slab.c, and slowly
> move/add torture/scaling tests to there?
That would work for me.
Thanx, Paul
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-08-03 15:37 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-30 14:32 [PATCH] mm/slab: stop exporting kvfree_rcu_barrier[_on_cache]() Vlastimil Babka (SUSE)
2026-07-30 20:59 ` Paul E. McKenney
2026-08-03 7:59 ` Vlastimil Babka (SUSE)
2026-08-03 12:26 ` Harry Yoo
2026-08-03 15:37 ` Paul E. McKenney
2026-08-01 12:51 ` Harry Yoo
2026-08-03 8:01 ` Vlastimil Babka (SUSE)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox