perf/core: Don't re-schedule CPU flexible events needlessly
authorAlexander Shishkin <alexander.shishkin@linux.intel.com>
Thu, 19 Jan 2017 16:43:29 +0000 (18:43 +0200)
committerIngo Molnar <mingo@kernel.org>
Mon, 30 Jan 2017 11:01:14 +0000 (12:01 +0100)
commitfe45bafbd0e1b5e828aa9d44d07e569df85869a2
tree3edb6f4db8cf67e2c38e03301952c2c5e10d7d42
parent1fd7e416995401ec082fc0fe6090a223969beda5
perf/core: Don't re-schedule CPU flexible events needlessly

In the sched-in path, we first remove a CPU's flexible events in order to
give priority to the task's pinned events. However, this step can be safely
skipped if the task doesn't have its own pinned events.

This patch implements this skipping.

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-2-alexander.shishkin@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/events/core.c