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

From: Tejun Heo
Date: Sat Oct 17 2009 - 23:11:03 EST


Hello, Christoph.

Christoph Lameter wrote:
>> The biggest grief I have is that the meaning of __ is different among
>> different accessors. If that can be cleared up, we would be in much
>> better shape without adding any extra macros. Can we just remove all
>> __'s and use meaningful pre or suffixes like raw or irq or whatever?
>
> It currently means that we do not deal with preempt and do not check for
> preemption. That is consistent.

If you define it inclusively, it can be consistent.

> Sure we could change the API to have even more macros than the large
> amount it already has so that we can check for proper preempt disablement.
>
> I guess that would mean adding
>
> raw_nopreempt_this_cpu_xx and nopreempt_this_cpu_xx variants? The thing
> gets huge. I think we could just leave it. __ suggests that serialization
> and checking is not performed like in the full versions and that is true.

I don't think we'll need to add new variants. Just renaming existing
ones so that they have more specific pre/suffix should make things
clearer. I'll give a shot at that once the sparse annotation patchset
is merged.

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/