lkml.org 
[lkml]   [2009]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 4/2] perf_counter: Fix swcounter context invariance
    From
    Date
    On Thu, 2009-08-13 at 10:05 +0200, Frederic Weisbecker wrote:
    > On Thu, Aug 13, 2009 at 09:51:55AM +0200, Peter Zijlstra wrote:
    > > Not really related to this topic, but it needs posting anyway.
    > >
    > > ---
    > >
    > > Subject: perf_counter: Fix swcounter context invariance
    > > From: Peter Zijlstra <a.p.zijlstra@chello.nl>
    > > Date: Fri Aug 07 13:29:13 CEST 2009
    > >
    > > perf_swcounter_is_counting() uses a lock, which means we cannot use
    > > swcounters from NMI or when holding that particular lock, this is
    > > unintended.
    > >
    > > The below removes the lock, this opens up race window, but not worse
    > > than the swcounters already experience due to RCU traversal of the
    > > context in perf_swcounter_ctx_event().
    > >
    > > Cc: Paul Mackerras <paulus@samba.org>
    > > Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
    >
    >
    >
    > As a side effect, it's possible this also fixes the hard lockups
    > while opening a lockdep tracepoint counter.

    It will -- not a side-effect at all, intended consequence :-)


    \
     
     \ /
      Last update: 2009-08-13 10:25    [from the cache]
    ©2003-2011 Jasper Spaans