Author Topic: FreeRTOS performance penalty  (Read 25749 times)

0 Members and 1 Guest are viewing this topic.

Offline andyturk

  • Frequent Contributor
  • **
  • Posts: 892
  • Country: us
Re: FreeRTOS performance penalty
« Reply #75 on: September 22, 2014, 01:54:12 pm »
[...] I also have access to RTX so the appeal of FreeRTOS isn't that great for me.

Everyone has access to RTX now. It's free too: http://www.keil.com/pr/article/1253.htm
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 10303
  • Country: gb
    • Having fun doing more, with less
Re: FreeRTOS performance penalty
« Reply #76 on: September 22, 2014, 02:42:41 pm »
A badly configured RTOS can kill your very expensive XYZ-machine by responding to the end switch or force sensor a few milliseconds late due to interrupt jitter. Certainly not irrelevant.
Very true, of course.

It also points to another serious weakness in dannyf's methods: it can only measure the mean times, whereas hard realtime systems require maximum times.

The same is, of course, true w.r.t. cache access times, but that's a completely different discussion.

BTW dannyf, what settings for priority inversion did you use when doing your measurements? They can significantly affect mean and max times, and hence jitter/latency.

There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline hans

  • Super Contributor
  • ***
  • Posts: 1042
  • Country: nl
Re: FreeRTOS performance penalty
« Reply #77 on: September 22, 2014, 02:45:09 pm »
Quote
To be more correct you need to subtract the low time of a pin toggle, as that's now included in the time measured.
To be completely correct you need to include the overhead of writing to a GPIO port as well, as some chips need to resolve pointers or do read-modify-write in software (hence the SET/CLR registers on some microcontrollers).

You may want to think it through.

Quote
At that point you may as well run the same test as Segger does.

Those "issues" you identified earlier apply equally to Segger's approach.

It takes a little bit of brain power to process, but those two approaches are really identical.

It seems like you haven't given any argument against my issue of your measurement method, so they still stand. You're just claiming you're right and smarter. I spot a trend that this is your usual way of arguing on this forum, and I find that highly disturbing in many ways.

You're still mixing up two things and doing nothing about it, where it can easily be reasoned it's relevant. Segger's way of measuring deals with the same issues (because they are tied to hardware related limitations) and therefore creates an (or at least more) accurate view of performance measurements.

It seems it's not like you are not unable to perform these measurements, but it's more a point that once your measurements is equal to what is already out there, there was no point in posting it.

Remember that if you don't accurately measure things it's not engineering, but it becomes art.
And when you realize all models are approximations of real-world phenomenons, we're not into engineering but science. Science wants to know the complete picture with all preconditions.

I view RTOS as a piece of software that enables you to do some things much easier, albeit at the cost of a bit CPU time and memory.
Some systems become so complex that you really can use the abstraction of tasks/threads/IPC to make the code readable, understandable and most importantly maintainable.
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 10303
  • Country: gb
    • Having fun doing more, with less
Re: FreeRTOS performance penalty
« Reply #78 on: September 22, 2014, 03:57:09 pm »
It seems like you (i.e. dannyf) haven't given any argument against my issue of your measurement method, so they still stand.

Not just your points and methods, of course. On this thread alone the same applies to myself and mikerj.

In the not-so-long run, if X ignores or refuses to answer other people's reasoned points, then it is detected by other people - and X's points/views are ignored. That's a shame, partly for the forum, but particularly for X.

Quote
You're just claiming you're right and smarter. I spot a trend that this is your usual way of arguing on this forum, and I find that highly disturbing in many ways.

Yes, precisely.

There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline Sal Ammoniac

  • Frequent Contributor
  • **
  • Posts: 921
  • Country: us
    • Embedded Tales Blog
Re: FreeRTOS performance penalty
« Reply #79 on: December 22, 2014, 07:15:39 pm »
dannyf: how are you measuring the parameter you call "Ticks on switch"?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf