From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx179.postini.com [74.125.245.179]) by kanga.kvack.org (Postfix) with SMTP id ABCFA6B00EB for ; Tue, 8 May 2012 10:11:09 -0400 (EDT) Date: Tue, 8 May 2012 09:11:07 -0500 (CDT) From: Christoph Lameter Subject: Re: [PATCH] slub: Using judgement !!c to judge per cpu has obj in fucntion has_cpu_slab(). In-Reply-To: Message-ID: References: <201205080931539844949@gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: Gilad Ben-Yossef Cc: majianpeng , linux-mm , Andrew Morton , Pekka Enberg On Tue, 8 May 2012, Gilad Ben-Yossef wrote: > diff --git a/mm/slub.c b/mm/slub.c > index ffe13fd..d66afc4 100644 > --- a/mm/slub.c > +++ b/mm/slub.c > @@ -2040,7 +2040,7 @@ static bool has_cpu_slab(int cpu, void *info) > struct kmem_cache *s = info; > struct kmem_cache_cpu *c = per_cpu_ptr(s->cpu_slab, cpu); > > - return !!(c->page); > + return !!(c->page && c->partial); &&? Should this not be || ? W#e can also drop the !! now I think. return c->page || c->partial -- 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: email@kvack.org