[lttng-dev] [RFC PATCH v2 13/13] Fix: quit early if instructed to

Jérémie Galarneau jeremie.galarneau at efficios.com
Thu Dec 14 01:58:01 UTC 2017


LGTM.

Jérémie

On 18 September 2017 at 18:52, Jonathan Rajotte
<jonathan.rajotte-julien at efficios.com> wrote:
> If the wait_queue size is considerable, not checking if the thread should
> quit delays the termination (3+ seconds during stress testing).
>
> Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien at efficios.com>
> ---
>  src/bin/lttng-sessiond/main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c
> index fb58ab4b..0475c5a3 100644
> --- a/src/bin/lttng-sessiond/main.c
> +++ b/src/bin/lttng-sessiond/main.c
> @@ -2244,7 +2244,7 @@ static void *thread_dispatch_ust_registration(void *data)
>                                 rcu_read_unlock();
>                                 session_unlock_list();
>                         }
> -               } while (node != NULL);
> +               } while (node != NULL && !CMM_LOAD_SHARED(dispatch_thread_exit));
>
>                 health_poll_entry();
>                 /* Futex wait on queue. Blocking call on futex() */
> --
> 2.11.0
>



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com


More information about the lttng-dev mailing list