lkml.org 
[lkml]   [2011]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    Subject[BUG] lock issue in perf cgroup with jump label enabled
    With CONFIG_JUMP_LABEL enabled:

    # mount -t cgroup -o perf_event xxx /mnt
    # mkdir /mnt/test
    # ./perf stat -B -a -e cycles:u -G test -- sleep 1

    lockdep warning will be triggered immediately, and the machine
    will become unresponsive.

    I guess this is the culprit?

    In the "perf cgroup support" patch:

    @@ -419,6 +781,17 @@ list_add_event(struct perf_event *event, struct perf_event_con
    list_add_tail(&event->group_entry, list);
    }

    + if (is_cgroup_event(event)) {
    + ctx->nr_cgroups++;
    + /*
    + * one more event:
    + * - that has cgroup constraint on event->cpu
    + * - that may need work on context switch
    + */
    + atomic_inc(&per_cpu(perf_cgroup_events, event->cpu));
    + jump_label_inc(&perf_sched_events);
    + }

    list_add_event() is called with spin lock ctl->lock held, while
    jump_label_inc() will acquire jump_label_mutex..


    \
     
     \ /
      Last update: 2011-03-03 09:31    [W:0.050 / U:216.692 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site