]> git.ipfire.org Git - thirdparty/linux.git/commit - kernel/events/core.c
perf/core: Fix event schedule order
authorPeter Zijlstra <peterz@infradead.org>
Mon, 13 Nov 2017 13:28:30 +0000 (14:28 +0100)
committerIngo Molnar <mingo@kernel.org>
Mon, 12 Mar 2018 14:28:49 +0000 (15:28 +0100)
commit1cac7b1ae3579457200213303fc28ca13b75592f
tree2db8f225af531e240eacfe20494cc89a70e8c47f
parent161c85fab7875f306eee9655dee71068feeb14ce
perf/core: Fix event schedule order

Scheduling in events with cpu=-1 before events with cpu=# changes
semantics and is undesirable in that it would priorize these events.

Given that groups->index is across all groups we actually have an
inter-group ordering, meaning we can merge-sort two groups, which is
just what we need to preserve semantics.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexey Budankov <alexey.budankov@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Carrillo-Cisneros <davidcc@google.com>
Cc: Dmitri Prokhorov <Dmitry.Prohorov@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Valery Cherepennikov <valery.cherepennikov@intel.com>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/events/core.c