Re: [RFC][PATCH 2/5] mm: Switch mod_state() to __this_cpu_read()

From: Christoph Lameter
Date: Tue Sep 20 2011 - 12:07:32 EST


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.

--
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/