Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'perf_urgent_for_v6.3_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf fixes from Borislav Petkov:

- Fix "same task" check when redirecting event output

- Do not wait unconditionally for RCU on the event migration path if
there are no events to migrate

* tag 'perf_urgent_for_v6.3_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf/core: Fix the same task check in perf_event_set_output
perf: Optimize perf_pmu_migrate_context()

+8 -6
+8 -6
kernel/events/core.c
··· 12173 12173 /* 12174 12174 * If its not a per-cpu rb, it must be the same task. 12175 12175 */ 12176 - if (output_event->cpu == -1 && output_event->ctx != event->ctx) 12176 + if (output_event->cpu == -1 && output_event->hw.target != event->hw.target) 12177 12177 goto out; 12178 12178 12179 12179 /* ··· 12893 12893 __perf_pmu_remove(src_ctx, src_cpu, pmu, &src_ctx->pinned_groups, &events); 12894 12894 __perf_pmu_remove(src_ctx, src_cpu, pmu, &src_ctx->flexible_groups, &events); 12895 12895 12896 - /* 12897 - * Wait for the events to quiesce before re-instating them. 12898 - */ 12899 - synchronize_rcu(); 12896 + if (!list_empty(&events)) { 12897 + /* 12898 + * Wait for the events to quiesce before re-instating them. 12899 + */ 12900 + synchronize_rcu(); 12900 12901 12901 - __perf_pmu_install(dst_ctx, dst_cpu, pmu, &events); 12902 + __perf_pmu_install(dst_ctx, dst_cpu, pmu, &events); 12903 + } 12902 12904 12903 12905 mutex_unlock(&dst_ctx->mutex); 12904 12906 mutex_unlock(&src_ctx->mutex);