aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/prog_array_init.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2024-08-07 13:29:25 +0200
committerPeter Zijlstra <peterz@infradead.org>2024-08-08 12:27:31 +0200
commit2d17cf1abcbe8a45b7dc41a768ed22aac158ddd8 (patch)
tree564e319ce034c31f897a7fbcc1251cb7cb4a2ee8 /tools/testing/selftests/bpf/prog_tests/prog_array_init.c
parentea1992f36b894fe60cc3537a7f6a7af4087b999a (diff)
perf: Optimize context reschedule for single PMU cases
Currently re-scheduling a context will reschedule all active PMUs for that context, even if it is known only a single event is added. Namhyung reported that changing this to only reschedule the affected PMU when possible provides significant performance gains under certain conditions. Therefore, allow partial context reschedules for a specific PMU, that of the event modified. While the patch looks somewhat noisy, it mostly just propagates a new @pmu argument through the callchain and modifies the epc loop to only pick the 'epc->pmu == @pmu' case. Reported-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Kan Liang <kan.liang@linux.intel.com> Reviewed-by: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/r/20240807115549.920950699@infradead.org
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/prog_array_init.c')
0 files changed, 0 insertions, 0 deletions