events: Replace synchronize_sched() with synchronize_rcu()
authorPaul E. McKenney <paulmck@linux.ibm.com>
Wed, 7 Nov 2018 03:20:05 +0000 (19:20 -0800)
committerPaul E. McKenney <paulmck@linux.ibm.com>
Tue, 27 Nov 2018 17:21:44 +0000 (09:21 -0800)
Now that synchronize_rcu() waits for preempt-disable regions of code
as well as RCU read-side critical sections, synchronize_sched() can be
replaced by synchronize_rcu().  This commit therefore makes this change.

Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
kernel/events/core.c

index 84530ab..c4b90cf 100644 (file)
@@ -9918,7 +9918,7 @@ static void account_event(struct perf_event *event)
                         * call the perf scheduling hooks before proceeding to
                         * install events that need them.
                         */
-                       synchronize_sched();
+                       synchronize_rcu();
                }
                /*
                 * Now that we have waited for the sync_sched(), allow further