linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Gilad Ben-Yossef <gilad@benyossef.com>
To: Christoph Lameter <cl@linux.com>
Cc: majianpeng <majianpeng@gmail.com>, linux-mm <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Pekka Enberg <penberg@kernel.org>
Subject: Re: [PATCH] slub: Using judgement !!c to judge per cpu has obj in fucntion has_cpu_slab().
Date: Tue, 8 May 2012 18:02:09 +0300	[thread overview]
Message-ID: <CAOtvUMd6vJoZrtNTy8-cfOha0dqg1auUuhOkMWMG9umcwrNEzA@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1205080909490.25669@router.home>

On Tue, May 8, 2012 at 5:11 PM, Christoph Lameter <cl@linux.com> wrote:
> 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
>
>

Yes, it should. My mind  is mush in the mornings...

I'm waiting for Majianpeng to confirm this indeed works.

Thanks,
Gilad

-- 
Gilad Ben-Yossef
Chief Coffee Drinker
gilad@benyossef.com
Israel Cell: +972-52-8260388
US Cell: +1-973-8260388
http://benyossef.com

"If you take a class in large-scale robotics, can you end up in a
situation where the homework eats your dog?"
 -- Jean-Baptiste Queru

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

  reply	other threads:[~2012-05-08 15:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-08  1:31 majianpeng
2012-05-08  7:29 ` Gilad Ben-Yossef
2012-05-08 14:11   ` Christoph Lameter
2012-05-08 15:02     ` Gilad Ben-Yossef [this message]
2012-05-09  1:18     ` Re: [PATCH] slub: Using judgement !!c to judge per cpu has obj infucntion has_cpu_slab() majianpeng
2012-05-09 13:47       ` Christoph Lameter
2012-05-09 14:10         ` Gilad Ben-Yossef
2012-05-08  8:40 ` majianpeng
2012-05-08  8:42   ` Gilad Ben-Yossef
2012-05-08 14:08 ` [PATCH] slub: Using judgement !!c to judge per cpu has obj in fucntion has_cpu_slab() 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=CAOtvUMd6vJoZrtNTy8-cfOha0dqg1auUuhOkMWMG9umcwrNEzA@mail.gmail.com \
    --to=gilad@benyossef.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=linux-mm@kvack.org \
    --cc=majianpeng@gmail.com \
    --cc=penberg@kernel.org \
    /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