All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Alan Gaglio <AGaglio@jerviswebb.com>,
	"xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: RTSerial Difference in Behavior Between 2.6.4 & 3.1
Date: Wed, 21 Apr 2021 09:00:08 +0200	[thread overview]
Message-ID: <39840ca2-483a-1ece-f6e2-c1a49f3fb462@siemens.com> (raw)
In-Reply-To: <CY4PR02MB261531B57960FF9BD47E890BDC489@CY4PR02MB2615.namprd02.prod.outlook.com>

On 20.04.21 16:45, Alan Gaglio via Xenomai wrote:
> I am in the process of upgrading from 32-bit/Xenomai 2.6.4/Ubuntu 14.04.4/
> Linux 3.16.7 to 64-bit/Xenomai 3.1/Ubuntu 20.04.1/Linux 5.4.77 and I'm
> experiencing an rtserial event difference in behavior. Our application
> depends on single-byte interrupts from rtserial ports, which we're
> not seeing despite having configured rtserial ports the same between our 2
> different image configurations that run on the same x86 hardware.
> Attached is a modified cross-link.c example that highlights this
> difference in behavior. Also included is relevant detail for each target,
> build, and sample program output.
> 
> My modified cross-link.c transmits 26 characters every 1 second and prints
> the number of RX_PEND events along with reception bins every 26 characters
> read by the receive thread. Reception bins show the number of bytes
> read per RX_PEND event [0-16,17+]. The total number of bytes
> processed equals the sum of all bins multiplied by the quantity they
> represent. For example, these snipped outputs (from the below greater
> details) were taken following a total of 208 bytes transmitted. In
> 2.6.4 we have 208 events * 1 byte = 208 bytes and in 3.1 we have
> 48 events * 4 bytes + 8 events * 2 bytes = 208 bytes. We expect/desire the
> second bin to be exclusively non-zero (2.6.4 output), indicating an RX_PEND
> event for each byte that arrives on the serial port.
> 
> 2.6.4 Output:
> rx.events=1  | rx.rx_pending=1 | r_t=1618404168709819446
> Count= 208 bins=0 208 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> 3.1 Output:
> rx.events=1  | rx.rx_pending=2 | r_t=1618406767806828954
> Count=  56 bins=0 0 8 0 48 0 0 0 0 0 0 0 0 0 0 0 0 0
> 
> I'm not sure where to take the next level of troubleshooting and am happy to
> provide additional detail, run tests, etc. The attached cross-link includes
> some preprocessor defines to modify program behaviors that I can explain if
> helpful. Details shown below are also attached with line wrapping removed
> for reference.
> 

Didn't dig through all the detailed information you provided yet, but
the first questions that come up for me would be

 - do interrupts for the UART arrive at the expected rate, or are they
   already delayed?

 - already tried to collect a system trace (ftrace event tracing) to
   gain an overview of what the application does when and what happens
   Xenomai-wise in the core (context switch, interrupts, etc.)?

If interpreting the trace is tricky, share it. Also taking tracing on
both 2.6 and 3.1 setups can help to find differences.

Jan

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux


  reply	other threads:[~2021-04-21  7:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-20 14:45 RTSerial Difference in Behavior Between 2.6.4 & 3.1 Alan Gaglio
2021-04-21  7:00 ` Jan Kiszka [this message]
2021-04-22 18:52   ` Alan Gaglio
2021-04-23  5:51     ` Jan Kiszka
2021-05-04 20:40       ` Alan Gaglio
2021-05-05  5:42         ` Jan Kiszka

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=39840ca2-483a-1ece-f6e2-c1a49f3fb462@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=AGaglio@jerviswebb.com \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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 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.