Re: [PATCH] slub: Using judgement !!c to judge per cpu has obj in fucntion has_cpu_slab().

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]