[haiku-development] Re: media_kit: handling events in a quantum of time

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 18 Apr 2016 09:53:17 +0200

Am 16.04.2016 um 22:10 schrieb Dario Casalinuovo:
[...]

    What are A and latency in this inequation?
A is the real time at which the event is handled.
[...]

Just to chime in: I have a hard time understanding you, too, Dario.
Could you please spend some extra time actually answering to Ingo's questions with more than a one liner, and not miss out half the questions on the way?

Calling read_port_etc() is the cost of a syscall, BTW. You just need to add the time for this to the estimated latency.
For the scheduling latency, we already have a function to estimate it (which could certainly be improved a lot, if you're interested in doing that).

It seems to me you are trying to wrestle against several problems at once, which doesn't really make much sense. First, the timing and latency computation (if there are any issues) should be fixed.
There simply cannot be any reasons for deadlocks in normal operation.
Optimization always comes last, and shouldn't be your concern at all as long as the logic isn't right yet. You don't have to care about minimizing the total latency yet; there are more pressing issues to deal with.

Bye,
   Axel.


Other related posts: