archive mirror
 help / color / mirror / Atom feed
From: Norbert Lange <>
To: Mathieu Desnoyers <>
Cc: Jan Kiszka <>,
	lttng-dev <>,
	paulmck <>, Xenomai <>
Subject: Re: Using lttng-ust with xenomai
Date: Fri, 22 Nov 2019 18:55:38 +0100	[thread overview]
Message-ID: <CADYdroNGcY6adA5cGTzwzsKqO7+iuWts9k8Haz8k3HSvzQfc=g__36699.4488447503$1574445386$gmane$> (raw)
In-Reply-To: <>

> LTTng-UST prepares the ring buffers from lttng-ust's "listener" thread,
> which is injected into the process by a lttng-ust constructor.
> What you will care about is how the tracepoint call-site (within a Xenomai
> thread) interacts with the ring buffers.
> The "default" setup for lttng-ust ring buffers is not suitable for Xenomai
> threads. The lttng-ust ring buffer is split into sub-buffers, each sub-buffer
> corresponding to a CTF trace "packet". When a sub-buffer is filled, lttng-ust
> invokes "write(2)" to a pipe to let the consumer daemon know there is data
> available in that ring buffer. You will want to get rid of that write(2) system
> call from a Xenomai thread.
> The proper configuration is to use lttng-enable-channel(1) "--read-timer"
> option (see This will
> ensure that the consumer daemon uses a polling approach to check periodically
> whether data needs to be consumed within each buffer, thus removing the
> use of the write(2) system call on the application-side.

Ah thanks.

But that's configuration outside of the RT app if I understand this correctly.
So if one configures a tracer wrong, then the app will suddenly misbehave.
Would be nice to be able to somehow tell that there is only read-timer allowed.

> > liburcu has configure options allow forcing the usage of this syscall
> > but not disabling it, which likely is necessary for Xenomai.
> I suspect what you'd need there is a way to allow a process to tell
> liburcu-bp (or liburcu) to always use the fall-back mechanism which does
> not rely on sys_membarrier. This could be allowed before the first use of
> the library. I think extending the liburcu APIs to allow this should be
> straightforward enough. This approach would be more flexible than requiring
> liburcu to be specialized at configure time. This new API would return an error
> if invoked with a liburcu library compiled with --disable-sys-membarrier-fallback.

I was under the impression, that you counted clock-cycles for every operation ;)
Not sure, maybe a separate lib for realtime is the better way. Having no option
can be considered foolproof, and sideeffects of the syscall not working would be
a real pain.

regards, Norbert

  parent reply	other threads:[~2019-11-22 17:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <>
2019-11-22 15:42 ` Using lttng-ust with xenomai Mathieu Desnoyers
     [not found] ` <>
2019-11-22 15:52   ` Jan Kiszka
     [not found]   ` <>
2019-11-22 17:01     ` Mathieu Desnoyers
     [not found]     ` <>
2019-11-22 17:36       ` Jan Kiszka
2019-11-22 17:44     ` Norbert Lange
     [not found]     ` <>
2019-11-22 17:52       ` Jan Kiszka
     [not found]       ` <>
2019-11-22 18:01         ` Norbert Lange
     [not found]         ` <>
2019-11-22 18:07           ` Jan Kiszka
     [not found]           ` <>
2019-11-22 21:38             ` Norbert Lange
2019-11-22 19:00       ` Mathieu Desnoyers
     [not found]       ` <>
2019-11-22 19:57         ` Norbert Lange
     [not found]         ` <>
2019-11-22 20:15           ` Mathieu Desnoyers
     [not found]           ` <>
2019-11-22 21:27             ` [lttng-dev] " Norbert Lange via Xenomai
2019-11-22 17:55   ` Norbert Lange [this message]
     [not found]   ` <>
2019-11-22 19:03     ` Mathieu Desnoyers
     [not found]     ` <>
2019-11-22 20:04       ` Norbert Lange
2019-11-22  9:14 Norbert Lange

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADYdroNGcY6adA5cGTzwzsKqO7+iuWts9k8Haz8k3HSvzQfc=g__36699.4488447503$1574445386$gmane$' \ \ \ \ \ \ \

* 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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).