All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH lttng-tools v2] Fix: wrong use of the relay_streams_sent in snapshot
       [not found] <1503521333-4905-1-git-send-email-jdesfossez@efficios.com>
@ 2017-08-24 15:15 ` Mathieu Desnoyers
       [not found] ` <165346610.15437.1503587759926.JavaMail.zimbra@efficios.com>
  2017-11-14  0:25 ` Jérémie Galarneau
  2 siblings, 0 replies; 7+ messages in thread
From: Mathieu Desnoyers @ 2017-08-24 15:15 UTC (permalink / raw)
  To: Julien Desfossez; +Cc: lttng-dev, Jeremie Galarneau

If you remove this, I think the streams will never get published
within the relayd. (publish_connection_local_streams()). Is this
an expected side-effect ? It should be documented in the changelog.
My guess is that we indeed don't want to publish the snapshot
streams to the viewers.

The reason for doing this change should also be documented. What
behavior is unwanted here from a relayd perspective ?

Thanks,

Mathieu

----- On Aug 23, 2017, at 1:48 PM, Julien Desfossez jdesfossez@efficios.com wrote:

> The relay_streams_sent message is only useful in live sessions and
> should only be sent after all the streams of a channel have been sent.
> 
> Here we were sending this message every time we sent a stream to the
> relay during a snapshot which makes no sense.
> 
> Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
> ---
> src/common/kernel-consumer/kernel-consumer.c | 8 --------
> src/common/ust-consumer/ust-consumer.c       | 6 ------
> 2 files changed, 14 deletions(-)
> 
> diff --git a/src/common/kernel-consumer/kernel-consumer.c
> b/src/common/kernel-consumer/kernel-consumer.c
> index a5dcc66..1c2751b 100644
> --- a/src/common/kernel-consumer/kernel-consumer.c
> +++ b/src/common/kernel-consumer/kernel-consumer.c
> @@ -187,14 +187,6 @@ int lttng_kconsumer_snapshot_channel(uint64_t key, char
> *path,
> 			DBG("Kernel consumer snapshot stream %s/%s (%" PRIu64 ")",
> 					path, stream->name, stream->key);
> 		}
> -		if (relayd_id != -1ULL) {
> -			ret = consumer_send_relayd_streams_sent(relayd_id);
> -			if (ret < 0) {
> -				ERR("sending streams sent to relayd");
> -				goto end_unlock;
> -			}
> -			channel->streams_sent_to_relayd = true;
> -		}
> 
> 		ret = kernctl_buffer_flush_empty(stream->wait_fd);
> 		if (ret < 0) {
> diff --git a/src/common/ust-consumer/ust-consumer.c
> b/src/common/ust-consumer/ust-consumer.c
> index 366f855..bce7db8 100644
> --- a/src/common/ust-consumer/ust-consumer.c
> +++ b/src/common/ust-consumer/ust-consumer.c
> @@ -1101,12 +1101,6 @@ static int snapshot_channel(uint64_t key, char *path,
> uint64_t relayd_id,
> 			DBG("UST consumer snapshot stream %s/%s (%" PRIu64 ")", path,
> 					stream->name, stream->key);
> 		}
> -		if (relayd_id != -1ULL) {
> -			ret = consumer_send_relayd_streams_sent(relayd_id);
> -			if (ret < 0) {
> -				goto error_unlock;
> -			}
> -		}
> 
> 		/*
> 		 * If tracing is active, we want to perform a "full" buffer flush.
> --
> 2.7.4
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

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

* Re: [PATCH lttng-tools v2] Fix: wrong use of the relay_streams_sent in snapshot
       [not found] ` <165346610.15437.1503587759926.JavaMail.zimbra@efficios.com>
@ 2017-08-24 19:35   ` Julien Desfossez
       [not found]   ` <516484ad-49e6-d89f-f8c1-6a1326c4def2@efficios.com>
  1 sibling, 0 replies; 7+ messages in thread
From: Julien Desfossez @ 2017-08-24 19:35 UTC (permalink / raw)
  To: Mathieu Desnoyers; +Cc: lttng-dev, Jeremie Galarneau

> If you remove this, I think the streams will never get published
> within the relayd. (publish_connection_local_streams()). Is this
> an expected side-effect ? It should be documented in the changelog.
> My guess is that we indeed don't want to publish the snapshot
> streams to the viewers.
Indeed, a snapshot session cannot be a live session, so we don't
want/need to publish those streams. Also, sending this message every
time we send a stream is a wrong usage of the command.

> The reason for doing this change should also be documented. What
> behavior is unwanted here from a relayd perspective ?
We are sending this message to the relay (and waiting for the
confirmation) before taking the snapshot of each stream. So, in addition
to being wrong and useless, it adds a considerable delay before taking
the snapshot of each stream.

Do you agree ?

Thanks,

Julien
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

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

* Re: [PATCH lttng-tools v2] Fix: wrong use of the relay_streams_sent in snapshot
       [not found]   ` <516484ad-49e6-d89f-f8c1-6a1326c4def2@efficios.com>
@ 2017-08-25 16:47     ` Mathieu Desnoyers
       [not found]     ` <1348147249.16120.1503679655259.JavaMail.zimbra@efficios.com>
  1 sibling, 0 replies; 7+ messages in thread
From: Mathieu Desnoyers @ 2017-08-25 16:47 UTC (permalink / raw)
  To: Julien Desfossez; +Cc: lttng-dev, Jeremie Galarneau

----- On Aug 24, 2017, at 12:35 PM, Julien Desfossez jdesfossez@efficios.com wrote:

>> If you remove this, I think the streams will never get published
>> within the relayd. (publish_connection_local_streams()). Is this
>> an expected side-effect ? It should be documented in the changelog.
>> My guess is that we indeed don't want to publish the snapshot
>> streams to the viewers.
> Indeed, a snapshot session cannot be a live session, so we don't
> want/need to publish those streams. Also, sending this message every
> time we send a stream is a wrong usage of the command.

You'll need to ensure that we are not freeing the streams too
quickly or leaking them in relayd after your change.

> 
>> The reason for doing this change should also be documented. What
>> behavior is unwanted here from a relayd perspective ?
> We are sending this message to the relay (and waiting for the
> confirmation) before taking the snapshot of each stream. So, in addition
> to being wrong and useless, it adds a considerable delay before taking
> the snapshot of each stream.
> 
> Do you agree ?

It looks like a good idea to remove it. I just want us to make sure the
snapshot mode does not somehow expect the streams to be published
within other parts of the relayd code.

Thanks,

Mathieu

> 
> Thanks,
> 
> Julien

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

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

* Re: [PATCH lttng-tools v2] Fix: wrong use of the relay_streams_sent in snapshot
       [not found]     ` <1348147249.16120.1503679655259.JavaMail.zimbra@efficios.com>
@ 2017-08-25 19:47       ` Julien Desfossez
       [not found]       ` <8cbd4059-f68b-ced2-2ed2-29a94f562887@efficios.com>
  1 sibling, 0 replies; 7+ messages in thread
From: Julien Desfossez @ 2017-08-25 19:47 UTC (permalink / raw)
  To: Mathieu Desnoyers; +Cc: lttng-dev, Jeremie Galarneau

>>> If you remove this, I think the streams will never get published
>>> within the relayd. (publish_connection_local_streams()). Is this
>>> an expected side-effect ? It should be documented in the changelog.
>>> My guess is that we indeed don't want to publish the snapshot
>>> streams to the viewers.
>> Indeed, a snapshot session cannot be a live session, so we don't
>> want/need to publish those streams. Also, sending this message every
>> time we send a stream is a wrong usage of the command.
> 
> You'll need to ensure that we are not freeing the streams too
> quickly or leaking them in relayd after your change.

Publishing the stream does not take a new reference on the stream, it
just adds it in the stream_list so it becomes visible in the viewer
thread. So it does not change the lifetime of the stream. And if the
stream is not published when we remove it we don't try to unpublish it.

>>> The reason for doing this change should also be documented. What
>>> behavior is unwanted here from a relayd perspective ?
>> We are sending this message to the relay (and waiting for the
>> confirmation) before taking the snapshot of each stream. So, in addition
>> to being wrong and useless, it adds a considerable delay before taking
>> the snapshot of each stream.
>>
>> Do you agree ?
> 
> It looks like a good idea to remove it. I just want us to make sure the
> snapshot mode does not somehow expect the streams to be published
> within other parts of the relayd code.

It looks good.

Thanks,

Julien
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

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

* Re: [PATCH lttng-tools v2] Fix: wrong use of the relay_streams_sent in snapshot
       [not found]       ` <8cbd4059-f68b-ced2-2ed2-29a94f562887@efficios.com>
@ 2017-08-26  0:03         ` Mathieu Desnoyers
  0 siblings, 0 replies; 7+ messages in thread
From: Mathieu Desnoyers @ 2017-08-26  0:03 UTC (permalink / raw)
  To: Julien Desfossez; +Cc: lttng-dev, Jeremie Galarneau

----- On Aug 25, 2017, at 12:47 PM, Julien Desfossez jdesfossez@efficios.com wrote:

>>>> If you remove this, I think the streams will never get published
>>>> within the relayd. (publish_connection_local_streams()). Is this
>>>> an expected side-effect ? It should be documented in the changelog.
>>>> My guess is that we indeed don't want to publish the snapshot
>>>> streams to the viewers.
>>> Indeed, a snapshot session cannot be a live session, so we don't
>>> want/need to publish those streams. Also, sending this message every
>>> time we send a stream is a wrong usage of the command.
>> 
>> You'll need to ensure that we are not freeing the streams too
>> quickly or leaking them in relayd after your change.
> 
> Publishing the stream does not take a new reference on the stream, it
> just adds it in the stream_list so it becomes visible in the viewer
> thread. So it does not change the lifetime of the stream. And if the
> stream is not published when we remove it we don't try to unpublish it.
> 
>>>> The reason for doing this change should also be documented. What
>>>> behavior is unwanted here from a relayd perspective ?
>>> We are sending this message to the relay (and waiting for the
>>> confirmation) before taking the snapshot of each stream. So, in addition
>>> to being wrong and useless, it adds a considerable delay before taking
>>> the snapshot of each stream.
>>>
>>> Do you agree ?
>> 
>> It looks like a good idea to remove it. I just want us to make sure the
>> snapshot mode does not somehow expect the streams to be published
>> within other parts of the relayd code.
> 
> It looks good.

Allright then, thanks!

Mathieu

> 
> Thanks,
> 
> Julien

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

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

* Re: [PATCH lttng-tools v2] Fix: wrong use of the relay_streams_sent in snapshot
       [not found] <1503521333-4905-1-git-send-email-jdesfossez@efficios.com>
  2017-08-24 15:15 ` [PATCH lttng-tools v2] Fix: wrong use of the relay_streams_sent in snapshot Mathieu Desnoyers
       [not found] ` <165346610.15437.1503587759926.JavaMail.zimbra@efficios.com>
@ 2017-11-14  0:25 ` Jérémie Galarneau
  2 siblings, 0 replies; 7+ messages in thread
From: Jérémie Galarneau @ 2017-11-14  0:25 UTC (permalink / raw)
  To: Julien Desfossez; +Cc: lttng-dev, Jeremie Galarneau

Merged, thanks!

Jérémie

On 23 August 2017 at 16:48, Julien Desfossez <jdesfossez@efficios.com> wrote:
> The relay_streams_sent message is only useful in live sessions and
> should only be sent after all the streams of a channel have been sent.
>
> Here we were sending this message every time we sent a stream to the
> relay during a snapshot which makes no sense.
>
> Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
> ---
>  src/common/kernel-consumer/kernel-consumer.c | 8 --------
>  src/common/ust-consumer/ust-consumer.c       | 6 ------
>  2 files changed, 14 deletions(-)
>
> diff --git a/src/common/kernel-consumer/kernel-consumer.c b/src/common/kernel-consumer/kernel-consumer.c
> index a5dcc66..1c2751b 100644
> --- a/src/common/kernel-consumer/kernel-consumer.c
> +++ b/src/common/kernel-consumer/kernel-consumer.c
> @@ -187,14 +187,6 @@ int lttng_kconsumer_snapshot_channel(uint64_t key, char *path,
>                         DBG("Kernel consumer snapshot stream %s/%s (%" PRIu64 ")",
>                                         path, stream->name, stream->key);
>                 }
> -               if (relayd_id != -1ULL) {
> -                       ret = consumer_send_relayd_streams_sent(relayd_id);
> -                       if (ret < 0) {
> -                               ERR("sending streams sent to relayd");
> -                               goto end_unlock;
> -                       }
> -                       channel->streams_sent_to_relayd = true;
> -               }
>
>                 ret = kernctl_buffer_flush_empty(stream->wait_fd);
>                 if (ret < 0) {
> diff --git a/src/common/ust-consumer/ust-consumer.c b/src/common/ust-consumer/ust-consumer.c
> index 366f855..bce7db8 100644
> --- a/src/common/ust-consumer/ust-consumer.c
> +++ b/src/common/ust-consumer/ust-consumer.c
> @@ -1101,12 +1101,6 @@ static int snapshot_channel(uint64_t key, char *path, uint64_t relayd_id,
>                         DBG("UST consumer snapshot stream %s/%s (%" PRIu64 ")", path,
>                                         stream->name, stream->key);
>                 }
> -               if (relayd_id != -1ULL) {
> -                       ret = consumer_send_relayd_streams_sent(relayd_id);
> -                       if (ret < 0) {
> -                               goto error_unlock;
> -                       }
> -               }
>
>                 /*
>                  * If tracing is active, we want to perform a "full" buffer flush.
> --
> 2.7.4
>



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

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

* [PATCH lttng-tools v2] Fix: wrong use of the relay_streams_sent in snapshot
@ 2017-08-23 20:48 Julien Desfossez
  0 siblings, 0 replies; 7+ messages in thread
From: Julien Desfossez @ 2017-08-23 20:48 UTC (permalink / raw)
  To: jgalar; +Cc: lttng-dev

The relay_streams_sent message is only useful in live sessions and
should only be sent after all the streams of a channel have been sent.

Here we were sending this message every time we sent a stream to the
relay during a snapshot which makes no sense.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
---
 src/common/kernel-consumer/kernel-consumer.c | 8 --------
 src/common/ust-consumer/ust-consumer.c       | 6 ------
 2 files changed, 14 deletions(-)

diff --git a/src/common/kernel-consumer/kernel-consumer.c b/src/common/kernel-consumer/kernel-consumer.c
index a5dcc66..1c2751b 100644
--- a/src/common/kernel-consumer/kernel-consumer.c
+++ b/src/common/kernel-consumer/kernel-consumer.c
@@ -187,14 +187,6 @@ int lttng_kconsumer_snapshot_channel(uint64_t key, char *path,
 			DBG("Kernel consumer snapshot stream %s/%s (%" PRIu64 ")",
 					path, stream->name, stream->key);
 		}
-		if (relayd_id != -1ULL) {
-			ret = consumer_send_relayd_streams_sent(relayd_id);
-			if (ret < 0) {
-				ERR("sending streams sent to relayd");
-				goto end_unlock;
-			}
-			channel->streams_sent_to_relayd = true;
-		}
 
 		ret = kernctl_buffer_flush_empty(stream->wait_fd);
 		if (ret < 0) {
diff --git a/src/common/ust-consumer/ust-consumer.c b/src/common/ust-consumer/ust-consumer.c
index 366f855..bce7db8 100644
--- a/src/common/ust-consumer/ust-consumer.c
+++ b/src/common/ust-consumer/ust-consumer.c
@@ -1101,12 +1101,6 @@ static int snapshot_channel(uint64_t key, char *path, uint64_t relayd_id,
 			DBG("UST consumer snapshot stream %s/%s (%" PRIu64 ")", path,
 					stream->name, stream->key);
 		}
-		if (relayd_id != -1ULL) {
-			ret = consumer_send_relayd_streams_sent(relayd_id);
-			if (ret < 0) {
-				goto error_unlock;
-			}
-		}
 
 		/*
 		 * If tracing is active, we want to perform a "full" buffer flush.
-- 
2.7.4

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

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

end of thread, other threads:[~2017-11-14  0:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1503521333-4905-1-git-send-email-jdesfossez@efficios.com>
2017-08-24 15:15 ` [PATCH lttng-tools v2] Fix: wrong use of the relay_streams_sent in snapshot Mathieu Desnoyers
     [not found] ` <165346610.15437.1503587759926.JavaMail.zimbra@efficios.com>
2017-08-24 19:35   ` Julien Desfossez
     [not found]   ` <516484ad-49e6-d89f-f8c1-6a1326c4def2@efficios.com>
2017-08-25 16:47     ` Mathieu Desnoyers
     [not found]     ` <1348147249.16120.1503679655259.JavaMail.zimbra@efficios.com>
2017-08-25 19:47       ` Julien Desfossez
     [not found]       ` <8cbd4059-f68b-ced2-2ed2-29a94f562887@efficios.com>
2017-08-26  0:03         ` Mathieu Desnoyers
2017-11-14  0:25 ` Jérémie Galarneau
2017-08-23 20:48 Julien Desfossez

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.