lkml.org 
[lkml]   [2010]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: fix BUG: using smp_processor_id() in touch_nmi_watchdog and touch_softlockup_watchdog
    From
    Date
    On Mon, 2010-08-16 at 10:12 -0400, Don Zickus wrote:
    > On Mon, Aug 16, 2010 at 03:46:58PM +0200, Peter Zijlstra wrote:
    > > > I don't see a problem with the patch, but my low level understanding of
    > > > the __get_cpu_var vs. per_cpu isn't very strong.
    > >
    > > __get_cpu_var() gets you the value on the current cpu, per_cpu() takes a
    > > cpu argument.
    >
    > Well I know that much. :-) It seems that __get_cpu_var depends on
    > preemption being disabled whereas per_cpu does not? Though for some
    > reason I thought __get_cpu_var would be more atomic when it grabbed the
    > current cpu such that you wouldn't need to disable preemption. Guess not.

    Indeed, it can't be implemented atomically on all smp systems, hence its
    really nothing other than a 'convenient' short for per_cpu(foo,
    smp_processor_id()).


    \
     
     \ /
      Last update: 2010-08-16 16:31    [W:2.213 / U:1.064 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site