All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Gallagher <greg@embeddedgreg.com>
To: Ho Tam <mophong@gmail.com>, xenomai <xenomai@xenomai.org>
Subject: Re: [Xenomai] Xenomai on Raspberry pi 2, 3 - Userspace task is interrupted?
Date: Wed, 08 Aug 2018 07:12:18 -0400	[thread overview]
Message-ID: <dcqod1d4ju4sjjl1d9q0fhov.1533726738829@embeddedgreg.com> (raw)
In-Reply-To: <CAK+-5=KE5pa1NUE4VY0uEVLH1+2P3dtbGWOBk9YxWLmAa16Juw@mail.gmail.com>


How are you setting up the gpio read and write? Is it possible to post a code snippet for the read and write?

Greg

  Original Message  
From: mophong@gmail.com
Sent: August 8, 2018 6:45 AM
To: xenomai@xenomai.org
Reply-to: mophong@gmail.com
Subject: [Xenomai] Xenomai on Raspberry pi 2, 3 - Userspace task is interrupted?

Hello all,
I make a simple code to measure process time on Raspberry pi 0,1,2,3 like:

* previous = rt_timer_read();*
* for (i=0; i<500; ++i)*
* {*
* bcm2835_gpio_write(TEST_PIN, HIGH);*
* bcm2835_gpio_write(TEST_PIN, LOW);*
* }*
* now = rt_timer_read();*
* process_time = (long) (now - previous);*
* if (process_time>worst_time)*
* worst_time=process_time;*

And I result after several hours running:
rpi           process_time (us)             worst_time (us)
0,1           ~100                                     115
2,3           ~90                                        373

It is clear that process time on rpi2,3 is shorter than that on rpi0,1 due
to higher speed CPU. However, I don't understand why worst case on rpi2,3
is much larger than that on rpi0,1. I have repeated this test on both
xenomai 2 and 3, kernel  4.1 and 4.9 (only xenomai 3 in this case) and with
different task priority, the result is quite consistent.
Does anyone have explanation and solution?
Thanks and regards,
_______________________________________________
Xenomai mailing list
Xenomai@xenomai.org
https://xenomai.org/mailman/listinfo/xenomai

  reply	other threads:[~2018-08-08 11:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-08 10:44 [Xenomai] Xenomai on Raspberry pi 2, 3 - Userspace task is interrupted? Ho Tam
2018-08-08 11:12 ` Greg Gallagher [this message]
2018-08-08 15:41   ` Ho Tam
2018-08-08 15:52     ` greg gallagher
2018-08-09  5:48       ` Ho Tam
2018-08-09 11:02         ` Ho Tam
2018-08-09 11:16         ` Greg Gallagher

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=dcqod1d4ju4sjjl1d9q0fhov.1533726738829@embeddedgreg.com \
    --to=greg@embeddedgreg.com \
    --cc=mophong@gmail.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.