From: Christoph Lameter <cl@linux.com>
To: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: linux-mm@kvack.org, David Rientjes <rientjes@google.com>
Subject: [S+Q Core 3/6] slub: Get rid of useless function count_free()
Date: Fri, 20 Aug 2010 14:01:54 -0500 [thread overview]
Message-ID: <20100820190235.573083017@linux.com> (raw)
In-Reply-To: 20100820190151.493325014@linux.com
[-- Attachment #1: unified_drop_count_free --]
[-- Type: text/plain, Size: 1749 bytes --]
count_free() == available()
Signed-off-by: Christoph Lameter <cl@linux-foundation.org>
---
mm/slub.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
Index: linux-2.6/mm/slub.c
===================================================================
--- linux-2.6.orig/mm/slub.c 2010-08-19 16:34:20.000000000 -0500
+++ linux-2.6/mm/slub.c 2010-08-19 16:34:23.000000000 -0500
@@ -1692,11 +1692,6 @@ static inline int node_match(struct kmem
return 1;
}
-static int count_free(struct page *page)
-{
- return available(page);
-}
-
static unsigned long count_partial(struct kmem_cache_node *n,
int (*get_count)(struct page *))
{
@@ -1745,7 +1740,7 @@ slab_out_of_memory(struct kmem_cache *s,
if (!n)
continue;
- nr_free = count_partial(n, count_free);
+ nr_free = count_partial(n, available);
nr_slabs = node_nr_slabs(n);
nr_objs = node_nr_objs(n);
@@ -3866,7 +3861,7 @@ static ssize_t show_slab_objects(struct
x = atomic_long_read(&n->total_objects);
else if (flags & SO_OBJECTS)
x = atomic_long_read(&n->total_objects) -
- count_partial(n, count_free);
+ count_partial(n, available);
else
x = atomic_long_read(&n->nr_slabs);
@@ -4778,7 +4773,7 @@ static int s_show(struct seq_file *m, vo
nr_partials += n->nr_partial;
nr_slabs += atomic_long_read(&n->nr_slabs);
nr_objs += atomic_long_read(&n->total_objects);
- nr_free += count_partial(n, count_free);
+ nr_free += count_partial(n, available);
}
nr_inuse = nr_objs - nr_free;
--
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>
next prev parent reply other threads:[~2010-08-20 19:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-20 19:01 [S+Q Core 0/6] SLUB: Queueing Core Christoph Lameter
2010-08-20 19:01 ` [S+Q Core 1/6] slub: Add per cpu queueing Christoph Lameter
2010-08-20 19:01 ` [S+Q Core 2/6] slub: Allow resizing of per cpu queues Christoph Lameter
2010-08-20 19:01 ` Christoph Lameter [this message]
2010-08-23 17:18 ` [S+Q Core 3/6] slub: Get rid of useless function count_free() Pekka Enberg
2010-08-20 19:01 ` [S+Q Core 4/6] slub: Remove MAX_OBJS limitation Christoph Lameter
2010-08-20 19:01 ` [S+Q Core 5/6] slub: Drop allocator announcement Christoph Lameter
2010-08-20 19:01 ` [S+Q Core 6/6] slub: Object based NUMA policies 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=20100820190235.573083017@linux.com \
--to=cl@linux.com \
--cc=linux-mm@kvack.org \
--cc=penberg@cs.helsinki.fi \
--cc=rientjes@google.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.