• Frederic Weisbecker's avatar
    perf: Comply with new rcu checks API · 49f135ed
    Frederic Weisbecker authored
    The software events hlist doesn't fully comply with the new
    rcu checks api.
    
    We need to consider three different sides that access the hlist:
    
    - the hlist allocation/release side. This side happens when an
      events is created or released, accesses to the hlist are
      serialized under the cpuctx mutex.
    
    - the events insertion/removal in the hlist. This side is always
      serialized against the above one. The hlist is always present
      during such operations. This side happens when a software event
      is scheduled in/out. The serialization that ensures the software
      event is really attached to the context is made under the
      ctx->lock.
    
    - events triggering. This is the read side, it can happen
      concurrently with any update side.
    
    This patch deals with them one by one and anticipates with the
    separate rcu mem space patches in preparation.
    
    This patch fixes various annoying rcu warnings.
    Reported-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
    Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
    Cc: Ingo Molnar <mingo@elte.hu>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Paul Mackerras <paulus@samba.org>
    49f135ed
perf_event.c 131 KB