slub: init_kmem_cache_cpus() and put_cpu_partial() can be static
Subsystems (2)
PATCH 1/1 slub: init_kmem_cache_cpus() and put_cpu_partial() can be static
--- mm/slub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
mm/slub.c +2 -2
@@ -1709,7 +1709,7 @@ static inline void note_cmpxchg_failure(stat (s,CMPXCHG_DOUBLE_CPU_FAIL ); } -void init_kmem_cache_cpus (struct kmem_cache *s) +static void init_kmem_cache_cpus (struct kmem_cache *s) {int cpu;
@@ -1934,7 +1934,7 @@ static void unfreeze_partials(struct kme* If we did not find a slot then simply move all the partials to the * per node partial list. */ -int put_cpu_partial (struct kmem_cache *s,struct page *page,int drain) +static int put_cpu_partial (struct kmem_cache *s,struct page *page,int drain) {struct page *oldpage;int pages;
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 2 lines · Fengguang Wu
Acked-by Glauber Costa <[email protected]>Signed-off-by Fengguang Wu <[email protected]>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 2 lines · Fengguang Wu
Acked-by Glauber Costa <[email protected]>Signed-off-by Fengguang Wu <[email protected]>
I think init_kmem_cache_cpus() would also benefit from just being inlined into alloc_kmem_cache_cpus().
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 9 lines · David Rientjes
Quoted 2 lines · Fengguang Wu
Acked-by Glauber Costa <[email protected]>Signed-off-by Fengguang Wu <[email protected]>Acked-by David Rientjes <[email protected]>I think
init_kmem_cache_cpus()would also benefit from just being inlined intoalloc_kmem_cache_cpus().
The compiler will do that if it is advantageous.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
David Rientjes
reviewerQuoted 10 lines · Christoph Lameter
Quoted 7 lines
Quoted 2 lines
Acked-by Glauber Costa <[email protected]>Signed-off-by Fengguang Wu <[email protected]>Acked-by David Rientjes <[email protected]>I think
init_kmem_cache_cpus()would also benefit from just being inlined intoalloc_kmem_cache_cpus().The compiler will do that if it is advantageous.
Which it obviously does with -O2, but I think it would be advantageous to do this at the source code level as well since we have a function with a single caller, which happens to be marked inline itself, but we're not inline. It seems cleaner to me, but it's only a suggestion. Thanks.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>