mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Pekka J Enberg <penberg@cs.helsinki.fi>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	andi@firstfloor.org, clameter@sgi.com, a.p.zijlstra@chello.nl
Subject: Re: [PATCH] slub: /proc/slabinfo ABI compatibility
Date: Sat, 22 Dec 2007 14:37:27 +0100	[thread overview]
Message-ID: <20071222133727.GA12031@elte.hu> (raw)
In-Reply-To: <20071222131601.GB32558@elte.hu>


* Ingo Molnar <mingo@elte.hu> wrote:

> > From: Pekka Enberg <penberg@cs.helsinki.fi>
> > 
> > This adds a read-only /proc/slabinfo file that is ABI compatible with 
> > SLAB for SLUB.
> > 
> > Cc: Ingo Molnar <mingo@elte.hu>
> 
> Tested-by: Ingo Molnar <mingo@elte.hu>

Pekka, i stuck your patch into the x86.git random-test-grid, and it 
found the following build error after a few iterations:

  mm/slub.c: In function 's_show':
  mm/slub.c:4188: error: implicit declaration of function 'count_partial'

find the (tested) fix below.

	Ingo

----------------->
Subject: SLUB: build fix
From: Ingo Molnar <mingo@elte.hu>

fix:

 mm/slub.c: In function 's_show':
 mm/slub.c:4188: error: implicit declaration of function 'count_partial'

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 mm/slub.c |   26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

Index: linux/mm/slub.c
===================================================================
--- linux.orig/mm/slub.c
+++ linux/mm/slub.c
@@ -3079,6 +3079,19 @@ void *__kmalloc_node_track_caller(size_t
 	return slab_alloc(s, gfpflags, node, caller);
 }
 
+static unsigned long count_partial(struct kmem_cache_node *n)
+{
+	unsigned long flags;
+	unsigned long x = 0;
+	struct page *page;
+
+	spin_lock_irqsave(&n->list_lock, flags);
+	list_for_each_entry(page, &n->partial, lru)
+		x += page->inuse;
+	spin_unlock_irqrestore(&n->list_lock, flags);
+	return x;
+}
+
 #if defined(CONFIG_SYSFS) && defined(CONFIG_SLUB_DEBUG)
 static int validate_slab(struct kmem_cache *s, struct page *page,
 						unsigned long *map)
@@ -3464,19 +3477,6 @@ static int list_locations(struct kmem_ca
 	return n;
 }
 
-static unsigned long count_partial(struct kmem_cache_node *n)
-{
-	unsigned long flags;
-	unsigned long x = 0;
-	struct page *page;
-
-	spin_lock_irqsave(&n->list_lock, flags);
-	list_for_each_entry(page, &n->partial, lru)
-		x += page->inuse;
-	spin_unlock_irqrestore(&n->list_lock, flags);
-	return x;
-}
-
 enum slab_stat_type {
 	SL_FULL,
 	SL_PARTIAL,

  reply	other threads:[~2007-12-22 13:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-22 12:47 Pekka J Enberg
2007-12-22 13:14 ` Ingo Molnar
2007-12-22 13:31   ` Pekka Enberg
2007-12-22 13:40     ` Ingo Molnar
2007-12-22 13:49       ` Pekka Enberg
2007-12-22 13:16 ` Ingo Molnar
2007-12-22 13:37   ` Ingo Molnar [this message]
2007-12-22 13:42     ` Pekka Enberg
2007-12-24 19:12     ` Christoph Lameter
2007-12-24 20:59       ` Pekka Enberg
2007-12-26 21:28         ` Christoph Lameter

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=20071222133727.GA12031@elte.hu \
    --to=mingo@elte.hu \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=clameter@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penberg@cs.helsinki.fi \
    /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

all inboxes | Powered by JetHome®