linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] slub: init_kmem_cache_cpus() and put_cpu_partial() can be static
@ 2012-09-28  8:34 Fengguang Wu
  2012-09-28 14:17 ` Christoph Lameter
  2012-10-03  4:55 ` David Rientjes
  0 siblings, 2 replies; 5+ messages in thread
From: Fengguang Wu @ 2012-09-28  8:34 UTC (permalink / raw)
  To: Pekka Enberg
  Cc: Christoph Lameter, Linux Memory Management List, LKML,
	Glauber Costa

Acked-by: Glauber Costa <glommer@parallels.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
 mm/slub.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- linux.orig/mm/slub.c	2012-09-24 10:22:11.000000000 +0800
+++ linux/mm/slub.c	2012-09-28 16:31:31.987092387 +0800
@@ -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 majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] slub: init_kmem_cache_cpus() and put_cpu_partial() can be static
  2012-09-28  8:34 [PATCH] slub: init_kmem_cache_cpus() and put_cpu_partial() can be static Fengguang Wu
@ 2012-09-28 14:17 ` Christoph Lameter
  2012-10-03  4:55 ` David Rientjes
  1 sibling, 0 replies; 5+ messages in thread
From: Christoph Lameter @ 2012-09-28 14:17 UTC (permalink / raw)
  To: Fengguang Wu
  Cc: Pekka Enberg, Linux Memory Management List, LKML, Glauber Costa

On Fri, 28 Sep 2012, Fengguang Wu wrote:

> Acked-by: Glauber Costa <glommer@parallels.com>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>

Acked-by: Christoph Lameter <cl@linux.com>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] slub: init_kmem_cache_cpus() and put_cpu_partial() can be static
  2012-09-28  8:34 [PATCH] slub: init_kmem_cache_cpus() and put_cpu_partial() can be static Fengguang Wu
  2012-09-28 14:17 ` Christoph Lameter
@ 2012-10-03  4:55 ` David Rientjes
  2012-10-03 14:16   ` Christoph Lameter
  1 sibling, 1 reply; 5+ messages in thread
From: David Rientjes @ 2012-10-03  4:55 UTC (permalink / raw)
  To: Fengguang Wu
  Cc: Pekka Enberg, Christoph Lameter, Linux Memory Management List,
	LKML, Glauber Costa

On Fri, 28 Sep 2012, Fengguang Wu wrote:

> Acked-by: Glauber Costa <glommer@parallels.com>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>

Acked-by: David Rientjes <rientjes@google.com>

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 majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] slub: init_kmem_cache_cpus() and put_cpu_partial() can be static
  2012-10-03  4:55 ` David Rientjes
@ 2012-10-03 14:16   ` Christoph Lameter
  2012-10-03 18:21     ` David Rientjes
  0 siblings, 1 reply; 5+ messages in thread
From: Christoph Lameter @ 2012-10-03 14:16 UTC (permalink / raw)
  To: David Rientjes
  Cc: Fengguang Wu, Pekka Enberg, Linux Memory Management List, LKML,
	Glauber Costa

On Tue, 2 Oct 2012, David Rientjes wrote:

> On Fri, 28 Sep 2012, Fengguang Wu wrote:
>
> > Acked-by: Glauber Costa <glommer@parallels.com>
> > Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
>
> Acked-by: David Rientjes <rientjes@google.com>
>
> I think init_kmem_cache_cpus() would also benefit from just being inlined
> into alloc_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 majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] slub: init_kmem_cache_cpus() and put_cpu_partial() can be static
  2012-10-03 14:16   ` Christoph Lameter
@ 2012-10-03 18:21     ` David Rientjes
  0 siblings, 0 replies; 5+ messages in thread
From: David Rientjes @ 2012-10-03 18:21 UTC (permalink / raw)
  To: Christoph Lameter
  Cc: Fengguang Wu, Pekka Enberg, Linux Memory Management List, LKML,
	Glauber Costa

On Wed, 3 Oct 2012, Christoph Lameter wrote:

> > > Acked-by: Glauber Costa <glommer@parallels.com>
> > > Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> >
> > Acked-by: David Rientjes <rientjes@google.com>
> >
> > I think init_kmem_cache_cpus() would also benefit from just being inlined
> > into alloc_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 majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-10-03 18:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-28  8:34 [PATCH] slub: init_kmem_cache_cpus() and put_cpu_partial() can be static Fengguang Wu
2012-09-28 14:17 ` Christoph Lameter
2012-10-03  4:55 ` David Rientjes
2012-10-03 14:16   ` Christoph Lameter
2012-10-03 18:21     ` David Rientjes

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).