lkml.org 
[lkml]   [2013]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [gcv v3 06/35] scheduler: Replace __get_cpu_var uses
On Tue, 3 Sep 2013 16:45:45 +0200
Frederic Weisbecker <fweisbec@gmail.com> wrote:

> 2013/9/3 Christoph Lameter <cl@linux.com>:
> > On Thu, 29 Aug 2013, Steven Rostedt wrote:
> >
> >> How many places use the this_cpu_*() without preemption disabled? I
> >> wouldn't think there's many. I never complained about another variant,
> >> so you need to ask those that have. The tough question for me is what
> >> that variant name should be ;-)
> >
> > Tried to add preemption checks but the basic issue is that many of the
> > checks themselves use this_cpu_ops. percpu.h is very basic to the
> > operation of fundamental primitives for preempt etc. Use of a BUG_ON needs
> > a seris of includes in percpu.h that cause more trouble.
> >
> > If I switch __this_cpu ops to check for preemption then the logic for
> > preemption etc must use the raw_this_cpu ops.
>
> IIUC the issue is that preempt debug checks themselves use per cpu
> operations that can result in preempt debug checks? Hence a recursion.
> Do you have an example of that?
>
> Also in this case this must be fixed anyway given the checks that
> already exist in smp_processor_id(), __get_cpu_var(), ...

Right, that's why there's a raw_smp_processor_id() and
__raw_get_cpu_var(). Those two are the ones without checks, and they
are called by the non "raw" versions after the check is done.

Really, what's so damn hard about this?

-- Steve


\
 
 \ /
  Last update: 2013-09-03 18:01    [W:0.051 / U:2.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site