]> git.baikalelectronics.ru Git - kernel.git/commit
perf/core: Optimize event rescheduling on active contexts
authorAlexander Shishkin <alexander.shishkin@linux.intel.com>
Thu, 19 Jan 2017 16:43:30 +0000 (18:43 +0200)
committerIngo Molnar <mingo@kernel.org>
Mon, 30 Jan 2017 11:01:15 +0000 (12:01 +0100)
commit8307a483014060b7c3a6f9c8ac9fdaa727ebc088
tree84d8d2c73e00f06739e798803195df0fb5dad6d6
parent6857b58b5926a9903b3a1c5a0f614383e158f089
perf/core: Optimize event rescheduling on active contexts

When new events are added to an active context, we go and reschedule
all cpu groups and all task groups in order to preserve the priority
(cpu pinned, task pinned, cpu flexible, task flexible), but in
reality we only need to reschedule groups of the same priority as
that of the events being added, and below.

This patch changes the behavior so that only groups that need to be
rescheduled are rescheduled.

Reported-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Cc: vince@deater.net
Link: http://lkml.kernel.org/r/20170119164330.22887-3-alexander.shishkin@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/events/core.c