Messages in this thread | | | Date | Tue, 20 Sep 2011 11:07:27 -0500 (CDT) | From | Christoph Lameter <> | Subject | Re: [RFC][PATCH 2/5] mm: Switch mod_state() to __this_cpu_read() |
| |
On Tue, 20 Sep 2011, Steven Rostedt wrote:
> > NO!! This defeats the whole purpose of this_cpu_ops and make the whole > > scheme utterly useless. > > The thing is, the whole purpose was broken to begin with. Defeating a > broken design is a good thing!
So then we are not allowed to use segment prefixes in core code to avoid preempt enable disable? And to avoid interrupt disabling enabling in critical allocator sections?
> > There are trivial cases like counter increments that are not a problem at > > all. Most use cases are those. More complex ones can be developed to avoid > > various overhead in performance critical sections of the kernel. > > > > And adding a preempt_disable; this_cpu_inc(); preempt_enable; is not a > bad thing either.
It defeats the purpose of the whole thing.
> What benchmarks do you have that shows this helped in anything????
The various patchsets that went into the kernel had benchmarks results.
| |