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
/*
* 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)
/*
* Destroy per PID and UID registry hash table.
- *
- * Should *NOT* be called with RCU read-side lock held.
*/
void buffer_reg_destroy_registries(void)
{
* 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)
{
/*
* 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)
* "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)
/*
* 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)
{
/*
* Put the consumer_output object.
- *
- * Should *NOT* be called with RCU read-side lock held.
*/
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)
{
/*
* Cleanup kernel session structure
- *
- * Should *NOT* be called with RCU read-side lock held.
*/
void trace_kernel_destroy_session(struct ltt_kernel_session *session)
{
/*
* 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)
{
/*
* 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)
/*
* 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)
{