Re: [this_cpu_xx V6 3/7] Use this_cpu operations in slub

From: Tejun Heo
Date: Mon Oct 12 2009 - 06:24:08 EST


Tejun Heo wrote:
> Hello,
>
> cl@xxxxxxxxxxxxxxxxxxxx wrote:
>> @@ -1507,7 +1498,7 @@ static inline void flush_slab(struct kme
>> */
>> static inline void __flush_cpu_slab(struct kmem_cache *s, int cpu)
>> {
>> - struct kmem_cache_cpu *c = get_cpu_slab(s, cpu);
>> + struct kmem_cache_cpu *c = per_cpu_ptr(s->cpu_slab, cpu);
>>
>> if (likely(c && c->page))
>> flush_slab(s, c);
>> @@ -1673,7 +1661,7 @@ new_slab:
>> local_irq_disable();
>>
>> if (new) {
>> - c = get_cpu_slab(s, smp_processor_id());
>> + c = __this_cpu_ptr(s->cpu_slab);
>
> Shouldn't this be this_cpu_ptr() without the double underscore?

Oh... another similar conversions in slab_alloc() and slab_free() too.

Thanks.

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/