Cleanup: remove outdated comments on RCU requirements
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Wed, 20 Jan 2021 21:18:09 +0000 (16:18 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 28 Jan 2022 19:50:24 +0000 (14:50 -0500)
The ht-cleanup thread was introduced to work-around the limitation that
the hash table destroy could not be called from a RCU read-side critical
section because of requirements from the rculfhash API, some comments
stating that destruction code should not be called from RCU read-side
critical sections were left in place when they should in fact have been
removed.

This ht-cleanup thread work around was introduced by the following
commit:
  commit 0b2dc8df2a6d7b3341a72a04767dd6328907c97c
  Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  Date:   Fri Jun 14 07:44:52 2013 -0400

    Fix: hash table cleanup call_rcu deadlock

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ifdaa63e6146b51fdb251e75795e382b5f390f7be

src/bin/lttng-sessiond/buffer-registry.cpp
src/bin/lttng-sessiond/client.cpp
src/bin/lttng-sessiond/consumer.cpp
src/bin/lttng-sessiond/trace-kernel.cpp
src/bin/lttng-sessiond/trace-ust.cpp
src/bin/lttng-sessiond/ust-app.cpp

index aca8ec1f227f54cc9f8fded46d8924c4b53841be..3928818272e1f334871b749f4684a38a813b2389 100644 (file)
@@ -574,8 +574,6 @@ void buffer_reg_channel_destroy(struct buffer_reg_channel *regp,
 
 /*
  * Destroy a buffer registry session with the given domain.
- *
- * Should *NOT* be called with RCU read-side lock held.
  */
 static void buffer_reg_session_destroy(struct buffer_reg_session *regp,
                enum lttng_domain_type domain)
@@ -735,8 +733,6 @@ void buffer_reg_pid_destroy(struct buffer_reg_pid *regp)
 
 /*
  * Destroy per PID and UID registry hash table.
- *
- * Should *NOT* be called with RCU read-side lock held.
  */
 void buffer_reg_destroy_registries(void)
 {
index 0820bca7690c6bd116ddad5c5e42ecedff3f3576..ae55804871916d5f2d49301b867930d68d7ec3fc 100644 (file)
@@ -416,8 +416,6 @@ error:
  * Copy consumer output from the tracing session to the domain session. The
  * function also applies the right modification on a per domain basis for the
  * trace files destination directory.
- *
- * Should *NOT* be called with RCU read-side lock held.
  */
 static int copy_session_consumer(int domain, struct ltt_session *session)
 {
@@ -481,8 +479,6 @@ error:
 
 /*
  * Create an UST session and add it to the session ust list.
- *
- * Should *NOT* be called with RCU read-side lock held.
  */
 static int create_ust_session(struct ltt_session *session,
                const struct lttng_domain *domain)
@@ -919,8 +915,6 @@ end:
  * "sock" is only used for special-case var. len data.
  * A command may assume the ownership of the socket, in which case its value
  * should be set to -1.
- *
- * Should *NOT* be called with RCU read-side lock held.
  */
 static int process_client_msg(struct command_ctx *cmd_ctx, int *sock,
                int *sock_error)
index f7a92cb3d9b282683da3d9ec3060af976b3cada0..ba4e2470f30c3b50ec670bc886f89c5d01d69cf2 100644 (file)
@@ -554,8 +554,6 @@ void consumer_destroy_output_sockets(struct consumer_output *obj)
 
 /*
  * Delete the consumer_output object from the list and free the ptr.
- *
- * Should *NOT* be called with RCU read-side lock held.
  */
 static void consumer_release_output(struct urcu_ref *ref)
 {
@@ -582,8 +580,6 @@ void consumer_output_get(struct consumer_output *obj)
 
 /*
  * Put the consumer_output object.
- *
- * Should *NOT* be called with RCU read-side lock held.
  */
 void consumer_output_put(struct consumer_output *obj)
 {
@@ -595,8 +591,6 @@ void consumer_output_put(struct consumer_output *obj)
 
 /*
  * Copy consumer output and returned the newly allocated copy.
- *
- * Should *NOT* be called with RCU read-side lock held.
  */
 struct consumer_output *consumer_copy_output(struct consumer_output *src)
 {
index 8d8c63e5db0eb021f41855c266b092234260b7ba..cbe4c3c89e072f1cda7185b4607a23d19228ddce 100644 (file)
@@ -999,8 +999,6 @@ void trace_kernel_destroy_metadata(struct ltt_kernel_metadata *metadata)
 
 /*
  * Cleanup kernel session structure
- *
- * Should *NOT* be called with RCU read-side lock held.
  */
 void trace_kernel_destroy_session(struct ltt_kernel_session *session)
 {
index ce85c32369f8567670b395c3211f47b4ba51ea85..ec62eef09810eca42ba55632f2898982560eaa99 100644 (file)
@@ -1387,8 +1387,6 @@ static void destroy_domain_global(struct ltt_ust_domain_global *dom)
 /*
  * Cleanup ust session structure, keeping data required by
  * destroy notifier.
- *
- * Should *NOT* be called with RCU read-side lock held.
  */
 void trace_ust_destroy_session(struct ltt_ust_session *session)
 {
index f12262101819d08b9c5d365ee1290de3bcac373b..570d011a7f4eace0d88f0f8969424985ef1d2d45 100644 (file)
@@ -1004,8 +1004,6 @@ void delete_ust_app_session(int sock, struct ust_app_session *ua_sess,
 /*
  * Delete a traceable application structure from the global list. Never call
  * this function outside of a call_rcu call.
- *
- * RCU read side lock should _NOT_ be held when calling this function.
  */
 static
 void delete_ust_app(struct ust_app *app)
@@ -4618,8 +4616,6 @@ error:
 
 /*
  * Free and clean all traceable apps of the global list.
- *
- * Should _NOT_ be called with RCU read-side lock held.
  */
 void ust_app_clean_list(void)
 {
This page took 0.029013 seconds and 4 git commands to generate.