linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] slub: remove a minus instruction in get_partial_node
@ 2011-09-29 10:05 Alex,Shi
  2011-09-29 14:18 ` Christoph Lameter
  0 siblings, 1 reply; 7+ messages in thread
From: Alex,Shi @ 2011-09-29 10:05 UTC (permalink / raw)
  To: cl@linux.com, Pekka Enberg; +Cc: linux-mm, Chen, Tim C, Huang, Ying

Don't do a minus action in get_partial_node function here, since
it is always zero.

Signed-off-by: Alex Shi <alex.shi@intel.com>
---
 mm/slub.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/mm/slub.c b/mm/slub.c
index 492beab..eb36a6b 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1613,7 +1613,7 @@ static void *get_partial_node(struct kmem_cache *s,
 	spin_lock(&n->list_lock);
 	list_for_each_entry_safe(page, page2, &n->partial, lru) {
 		void *t = acquire_slab(s, n, page, object == NULL);
-		int available;
+		int available = 0;
 
 		if (!t)
 			continue;
@@ -1623,7 +1623,6 @@ static void *get_partial_node(struct kmem_cache *s,
 			c->node = page_to_nid(page);
 			stat(s, ALLOC_FROM_PARTIAL);
 			object = t;
-			available =  page->objects - page->inuse;
 		} else {
 			page->freelist = t;
 			available = put_cpu_partial(s, page, 0);
-- 
1.7.0



--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2011-10-11  9:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-29 10:05 [PATCH] slub: remove a minus instruction in get_partial_node Alex,Shi
2011-09-29 14:18 ` Christoph Lameter
2011-10-02 12:55   ` Shi, Alex
2011-10-03 13:55     ` Christoph Lameter
2011-10-08  2:48       ` Alex,Shi
2011-10-10 17:11         ` Christoph Lameter
2011-10-11  9:50           ` Alex,Shi

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