[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.1.10.0910131117060.8088@gentwo.org>
Date: Tue, 13 Oct 2009 11:20:57 -0400 (EDT)
From: Christoph Lameter <cl@...ux-foundation.org>
To: Tejun Heo <tj@...nel.org>
cc: linux-kernel@...r.kernel.org,
Pekka Enberg <penberg@...helsinki.fi>,
Mel Gorman <mel@....ul.ie>,
Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
Subject: Re: [this_cpu_xx V6 3/7] Use this_cpu operations in slub
On Tue, 13 Oct 2009, Tejun Heo wrote:
> Yeah, widespread use of underscored versions isn't very desirable.
> The underscored versions should notify certain specific exceptional
> conditions instead of being used as general optimization (which
> doesn't make much sense after all as the optimization is only
> meaningful with debug option turned on). Are you interested in doing
> a sweeping patch to drop underscores from __this_cpu_*() conversions?
Nope. __this_cpu_add/dec cannot be converted.
__this_cpu_ptr could be converted to this_cpu_ptr but I think the __ are
useful there too to show that we are in a preempt section.
The calls to raw_smp_processor_id and smp_processor_id() are only useful
in the fallback case. There is no need for those if the arch has a way to
provide the current percpu offset. So we in effect have two meanings of __
right now.
1. We do not care about the preempt state (thus we call
raw_smp_processor_id so that the preempt state does not trigger)
2. We do not need to disable preempt before the operation.
__this_cpu_ptr only implies 1. __this_cpu_add uses 1 and 2.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists