linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/4] tracing/user_events: Use non-RCU context for enabler writes
@ 2023-05-19 23:07 Beau Belgrave
  2023-05-19 23:07 ` [PATCH v3 1/4] tracing/user_events: Split up mm alloc and attach Beau Belgrave
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Beau Belgrave @ 2023-05-19 23:07 UTC (permalink / raw)
  To: rostedt, mhiramat; +Cc: linux-kernel, linux-trace-kernel, torvalds, ast

Currently when events are enabled/disabled a top level mm enumeration is
done in a non-RCU context, however, the enablers are still in a
RCU-context. Each enabler is updated via user_event_enabler_write() which
uses pin_user_pages_remote(). This function can reschedule and should not
be used from a RCU-context, which this series addresses.

There was also feedback given that some of the code was confusing and
needed further comments and field renames, especially for links. I think
having this feedback will help others contribute to this code easier, so
I am grouping this into a single series to address this together.

NOTE: Series is based on the for-next branch of the following tree:
git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git

Change history

V3:
Use Linus's patches to more completely solve this issue.

Added comments and renamed fields as suggested by Linus to ensure easier
reasoning over the code for everyone.

V2:
Remove break statement that prevents more than 1 enabler in MM for same
event (rare, but possible).

Beau Belgrave (2):
  tracing/user_events: Rename link fields for clarity
  tracing/user_events: Document user_event_mm one-shot list usage

Linus Torvalds (2):
  tracing/user_events: Split up mm alloc and attach
  tracing/user_events: Remove RCU lock while pinning pages

 include/linux/user_events.h      |  3 +-
 kernel/trace/trace_events_user.c | 97 +++++++++++++++++++++-----------
 2 files changed, 67 insertions(+), 33 deletions(-)


base-commit: 3862f86c1529fa0016de6344eb974877b4cd3838
-- 
2.25.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-05-20  2:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-19 23:07 [PATCH v3 0/4] tracing/user_events: Use non-RCU context for enabler writes Beau Belgrave
2023-05-19 23:07 ` [PATCH v3 1/4] tracing/user_events: Split up mm alloc and attach Beau Belgrave
2023-05-19 23:07 ` [PATCH v3 2/4] tracing/user_events: Remove RCU lock while pinning pages Beau Belgrave
2023-05-19 23:07 ` [PATCH v3 3/4] tracing/user_events: Rename link fields for clarity Beau Belgrave
2023-05-19 23:07 ` [PATCH v3 4/4] tracing/user_events: Document user_event_mm one-shot list usage Beau Belgrave
2023-05-20  2:15 ` [PATCH v3 0/4] tracing/user_events: Use non-RCU context for enabler writes Linus Torvalds

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).