+35
−33
Loading
mainline inclusion from mainline-v6.3-rc6 commit b1680989 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IAL27E Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b168098912926236bbeebaf7795eb7aab76d2b45 --------------------------- Thomas reported that offlining CPUs spends a lot of time in synchronize_rcu() as called from perf_pmu_migrate_context() even though he's not actually using uncore events. Turns out, the thing is unconditionally waiting for RCU, even if there's no actual events to migrate. Fixes: 0cda4c02 ("perf: Introduce perf_pmu_migrate_context()") Reported-by:Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by:
Thomas Gleixner <tglx@linutronix.de> Reviewed-by:
Thomas Gleixner <tglx@linutronix.de> Reviewed-by:
Paul E. McKenney <paulmck@kernel.org> Link: https://lkml.kernel.org/r/20230403090858.GT4253@hirez.programming.kicks-ass.net Conflicts: kernel/events/core.c [Due to not merge previous commit bd275681] Signed-off-by:
Liu Chuang <liuchuang40@huawei.com>