]> git.baikalelectronics.ru Git - kernel.git/commit
perf/core: Explain perf_sched_mutex
authorAlexander Shishkin <alexander.shishkin@linux.intel.com>
Tue, 29 Aug 2017 14:01:03 +0000 (17:01 +0300)
committerIngo Molnar <mingo@kernel.org>
Fri, 29 Sep 2017 11:28:30 +0000 (13:28 +0200)
commit65abe265466417453ec9fde7145e8ce2795a1082
tree98d531a881d66e722e2f275a43f4fc3681d21630
parentedea068317d790d3506247c93050613bf62bdfcd
perf/core: Explain perf_sched_mutex

To clarify why atomic_inc_return(&perf_sched_events) is not sufficient and
a mutex is needed to order static branch enabling vs the atomic counter
increment, this adds a comment with a short explanation.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20170829140103.6563-1-alexander.shishkin@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/events/core.c