lkml.org 
[lkml]   [2011]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.



\
 
 \ /
  Last update: 2011-09-20 18:09    [W:0.348 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site