From: Beau Belgrave <beaub@linux.microsoft.com>
To: rostedt@goodmis.org, mhiramat@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
torvalds@linux-foundation.org, ast@kernel.org
Subject: [PATCH v3 0/4] tracing/user_events: Use non-RCU context for enabler writes
Date: Fri, 19 May 2023 16:07:37 -0700 [thread overview]
Message-ID: <20230519230741.669-1-beaub@linux.microsoft.com> (raw)
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
next reply other threads:[~2023-05-19 23:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-19 23:07 Beau Belgrave [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230519230741.669-1-beaub@linux.microsoft.com \
--to=beaub@linux.microsoft.com \
--cc=ast@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.