]> git.ipfire.org Git - thirdparty/linux.git/commit
perf: Identify the 0->1 transition for event::mmap_count
authorPeter Zijlstra <peterz@infradead.org>
Tue, 12 Aug 2025 10:39:12 +0000 (12:39 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 15 Aug 2025 11:13:02 +0000 (13:13 +0200)
commit59741451b49ce9964a9758c19d6f7df2a1255c75
tree7eb01f580aa95efe9c4ddc7df5fcfedcd531ed50
parentd23a6dbc0a71741eb7b141fdc04e31360fba46ef
perf: Identify the 0->1 transition for event::mmap_count

Needed because refcount_inc() doesn't allow the 0->1 transition.

Specifically, this is the case where we've created the RB, this means
there was no RB, and as such there could not have been an mmap.
Additionally we hold mmap_mutex to serialize everything.

This must be the first.

Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20250812104019.956479989@infradead.org
kernel/events/core.c