linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Need information on elevator_dispatch_fn
@ 2007-10-31 10:00 Philipp Gruber
  2007-10-31 10:58 ` Jens Axboe
  2007-10-31 11:36 ` Aaron Carroll
  0 siblings, 2 replies; 3+ messages in thread
From: Philipp Gruber @ 2007-10-31 10:00 UTC (permalink / raw)
  To: linux-kernel

Hello everyone,

I'm just working on an I/O-scheduler that implements some QoS
functionality.

Now I get some weird problems and need to know what triggers my
elevator_dispatch_fn, and how the return value of it is handled.
For now, I found that the dispatch function is called as long as there
are requests in my queue, so probably as long as it returns 1. On the
other hand, only every second dispatch call returns 1, the others 0, but
still it's working. I couldn't find any documentation about that (but
would like to write some, if I understood it). Could someone please
explain me when and why exactly elevator_dispatch_fn is triggered?

A little background:
Now that I'm implementing my QoS, I have one queue for each process, and
prioritized processes get a timeslice, where they can access the device
exclusively.
A timeslice might be 400ms, but if a process is finished after 200ms
and has no more requests, dispatch will return 0 and then it won't be
triggered anymore. So, when the next process has his timeslice, even if
it has requests, dispatch_fn is not triggered, so the process will
starve and hang forever.
So I need to 'reactivate' the whole dispatching process again. The only
way to to this is probably a timer, but I couldn't get this working
since I don't understand what calls dispatch_fn.

thanks in advance,
Philipp

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-10-31 11:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-31 10:00 Need information on elevator_dispatch_fn Philipp Gruber
2007-10-31 10:58 ` Jens Axboe
2007-10-31 11:36 ` Aaron Carroll

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).