lkml.org 
[lkml]   [2020]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] perf/core: install cgroup events to correct cpuctx
On Wed, Jan 22, 2020 at 11:50:27AM -0800, Song Liu wrote:
> cgroup events are always installed in the cpuctx. However, when it is not
> installed via IPI, list_update_cgroup_event() adds it to cpuctx of current
> CPU, which triggers the following with CONFIG_DEBUG_LIST:
>

> [ 31.777570] list_add double add: new=ffff888ff7cf0db0, prev=ffff888ff7ce82f0, next=ffff888ff7cf0db0.

> To reproduce this, we can simply run:
> perf stat -e cs -a &
> perf stat -e cs -G anycgroup
>
> Fix this by installing it to cpuctx that contains event->ctx, and the
> proper cgrp_cpuctx_list.
>
> Fixes: db0503e4f675 ("perf/core: Optimize perf_install_in_event()")
> Suggested-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> Cc: Andi Kleen <andi@firstfloor.org>
> Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
> Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> Cc: Jiri Olsa <jolsa@redhat.com>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Signed-off-by: Song Liu <songliubraving@fb.com>

Thanks!

\
 
 \ /
  Last update: 2020-01-24 10:16    [W:0.098 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site