Fast-DDS icon indicating copy to clipboard operation
Fast-DDS copied to clipboard

Mode switches when using write(&msg) function inside a Xenomai RT kernel

Open MMarcus95 opened this issue 5 months ago • 0 comments

Is there an already existing issue for this?

  • [x] I have searched the existing issues

Expected behavior

Mode switches are not happening when using write function

Current behavior

Hello,

I'm scheduling a process with FIFO policy under Ubuntu 20.04 with a Xenomai RT kernel patch (6.12.19-xeno-3.3.1+). By using the command

watch -n 0.1 cat /proc/xenomai/sched/stat

I can monitor the mode switches (MSW) happening in my process. I noticed that the write function of the datawriter I'm using gives MSW when the datawriter starts sending data to a datareader that belongs to another process. If there is not datareader, MSW are not happening.

I tried following the use-case-realtime tutorial, and setting ASYNCHRONOUS_PUBLISH_MODE with flow controllers, but it did not work out.

Can you help me configuring the datawriter such that I don't have MSW? It is needed for strict real-time requirements.

Also, do you have suggestions for the datareader configuration too?

Thanks!

Steps to reproduce

A Xenomai RT patch is required. The default HelloWord example from FastDDS API can be used. Mode switches can be monitored with

watch -n 0.1 cat /proc/xenomai/sched/stat

Fast DDS version/commit

v3.1.1

Platform/Architecture

Ubuntu Focal 20.04 amd64

Transport layer

Default configuration, UDPv4 & SHM

Additional context

I'm using Discovery Server

XML configuration file


Relevant log output


Network traffic capture

No response

MMarcus95 avatar Aug 06 '25 10:08 MMarcus95