Re: Exporting sched_yield to the drivers

2003-09-25 Thread Egbert Eich
Jim Gettys writes: Most operating schedulers are much happier to give you the CPU again if you don't monopolize the CPU, and let the other processes get the CPU regularly. Generally, they boost the priority of processes that just use a short amount of CPU, and then give it back.

Re: Exporting sched_yield to the drivers

2003-09-25 Thread Mark Vojkovich
Can we at least agree to export an xf86Yield() function? It will be sched_yield() on whatever plaforms support it, a noop on others. If somebody comes up with something better to implement it with, then great. Mark. ___

Re: Exporting sched_yield to the drivers

2003-09-25 Thread Emmanuel Allaud
Mark Vojkovich wrote: Can we at least agree to export an xf86Yield() function? It will be sched_yield() on whatever plaforms support it, a noop on others. If somebody comes up with something better to implement it with, then great. I have no voice on that but still : I think this would

Re: Exporting sched_yield to the drivers

2003-09-23 Thread Thomas Winischhofer
Nathan Hand wrote: Why not slice 1) send 1 megabyte ... slice 2) fifo not drained, reduce fifo to 512kB, wait ... slice 3) fifo not drained, reduce fifo to 256kB, wait ... slice 4) fifo drained, send 256kB ... slice 5) fifo

Re: Exporting sched_yield to the drivers

2003-09-23 Thread Egbert Eich
Mark Vojkovich writes: Can we export to the drivers some function that yields the CPU? Currently alot of drivers burn the CPU waiting for fifos, etc... usleep(0) is not good for this because it's jiffy based and usually never returns in less than 10 msec which has the effect of making

Re: Exporting sched_yield to the drivers

2003-09-23 Thread Egbert Eich
Mark Vojkovich writes: Your experience is out of date. If I've just filled a Megabyte DMA fifo and I'm waiting to cram another Megabyte into it, how quick is my FIFO busy loop then? I've had great success with sched_yield(). The DMA buffer case may be different than the video

Re: Exporting sched_yield to the drivers

2003-09-23 Thread Jim Gettys
Most operating schedulers are much happier to give you the CPU again if you don't monopolize the CPU, and let the other processes get the CPU regularly. Generally, they boost the priority of processes that just use a short amount of CPU, and then give it back. This is typical interactive

Re: Exporting sched_yield to the drivers

2003-09-23 Thread emmanuel ALLAUD
--- Egbert Eich [EMAIL PROTECTED] a écrit : Mark Vojkovich writes: Can we export to the drivers some function that yields the CPU? Currently alot of drivers burn the CPU waiting for fifos, etc... usleep(0) is not good for this because it's jiffy based and usually never returns

Re: Exporting sched_yield to the drivers

2003-09-23 Thread Alex Deucher
info on futexes: http://ds9a.nl/futex-manpages/ I'm not real familiar with them. Alex --- Mark Vojkovich [EMAIL PROTECTED] wrote: On Tue, 23 Sep 2003, [iso-8859-1] emmanuel ALLAUD wrote: This is perhaps a dumb idea, but could the futexes help here? I don't know if they have equivalent

Re: Exporting sched_yield to the drivers

2003-09-23 Thread emmanuel ALLAUD
--- Mark Vojkovich [EMAIL PROTECTED] a écrit : On Tue, 23 Sep 2003, [iso-8859-1] emmanuel ALLAUD wrote: This is perhaps a dumb idea, but could the futexes help here? I don't know if they have equivalent on other OSes than Linux. Bye Manu I don't see how they help. The problem

Re: Exporting sched_yield to the drivers

2003-09-23 Thread Mark Vojkovich
On Tue, 23 Sep 2003, [iso-8859-1] emmanuel ALLAUD wrote: I'm assuming futexes are some interprocess mutex mechanism? If so, I don't see how this helps. Yes it is. Actually I am not familiar with them either, but if you had a way to be able to wake up your waiting process ASAP

Re: Exporting sched_yield to the drivers

2003-09-23 Thread emmanuel ALLAUD
--- Mark Vojkovich [EMAIL PROTECTED] a écrit : On Tue, 23 Sep 2003, [iso-8859-1] emmanuel ALLAUD wrote: I'm assuming futexes are some interprocess mutex mechanism? If so, I don't see how this helps. Yes it is. Actually I am not familiar with them either, but if

Re: Exporting sched_yield to the drivers

2003-09-23 Thread Mark Vojkovich
On Tue, 23 Sep 2003, [iso-8859-1] emmanuel ALLAUD wrote: The problem with yielding is that you can have interactivity problem if the computer is loaded enough. If you don't yield you have an interactivity problem. What good is keeping your time slices if all you're doing during them is

Re: Exporting sched_yield to the drivers

2003-09-23 Thread emmanuel ALLAUD
--- Mark Vojkovich [EMAIL PROTECTED] a écrit : On Tue, 23 Sep 2003, [iso-8859-1] emmanuel ALLAUD wrote: The problem with yielding is that you can have interactivity problem if the computer is loaded enough. If you don't yield you have an interactivity problem. What good is

Exporting sched_yield to the drivers

2003-09-22 Thread Mark Vojkovich
Can we export to the drivers some function that yields the CPU? Currently alot of drivers burn the CPU waiting for fifos, etc... usleep(0) is not good for this because it's jiffy based and usually never returns in less than 10 msec which has the effect of making interactivity worse instead of

Re: Exporting sched_yield to the drivers

2003-09-22 Thread Ian Romanick
Mark Vojkovich wrote: Can we export to the drivers some function that yields the CPU? Currently alot of drivers burn the CPU waiting for fifos, etc... usleep(0) is not good for this because it's jiffy based and usually never returns in less than 10 msec which has the effect of making

Re: Exporting sched_yield to the drivers

2003-09-22 Thread Matthieu Herrb
Ian Romanick wrote (in a message from Monday 22) Mark Vojkovich wrote: Can we export to the drivers some function that yields the CPU? Currently alot of drivers burn the CPU waiting for fifos, etc... usleep(0) is not good for this because it's jiffy based and usually never

Re: Exporting sched_yield to the drivers

2003-09-22 Thread Nathan Hand
On Tue, 2003-09-23 at 05:58, Mark Vojkovich wrote: Can we export to the drivers some function that yields the CPU? Currently alot of drivers burn the CPU waiting for fifos, etc... usleep(0) is not good for this because it's jiffy based and usually never returns in less than 10 msec which has

Re: Exporting sched_yield to the drivers

2003-09-22 Thread Mark Vojkovich
On Mon, 22 Sep 2003, Ian Romanick wrote: Mark Vojkovich wrote: Can we export to the drivers some function that yields the CPU? Currently alot of drivers burn the CPU waiting for fifos, etc... usleep(0) is not good for this because it's jiffy based and usually never returns in less

Re: Exporting sched_yield to the drivers

2003-09-22 Thread Mark Vojkovich
On Tue, 23 Sep 2003, Nathan Hand wrote: On Tue, 2003-09-23 at 05:58, Mark Vojkovich wrote: Can we export to the drivers some function that yields the CPU? Currently alot of drivers burn the CPU waiting for fifos, etc... usleep(0) is not good for this because it's jiffy based and usually

Re: Exporting sched_yield to the drivers

2003-09-22 Thread Nathan Hand
On Tue, 2003-09-23 at 07:55, Mark Vojkovich wrote: On Tue, 23 Sep 2003, Nathan Hand wrote: On Tue, 2003-09-23 at 05:58, Mark Vojkovich wrote: Can we export to the drivers some function that yields the CPU? Currently alot of drivers burn the CPU waiting for fifos, etc... usleep(0)

Re: Exporting sched_yield to the drivers

2003-09-22 Thread Ian Romanick
Mark Vojkovich wrote: On Mon, 22 Sep 2003, Ian Romanick wrote: Mark Vojkovich wrote: Can we export to the drivers some function that yields the CPU? Currently alot of drivers burn the CPU waiting for fifos, etc... usleep(0) is not good for this because it's jiffy based and usually never

Re: Exporting sched_yield to the drivers

2003-09-22 Thread Ian Romanick
Nathan Hand wrote: On Tue, 2003-09-23 at 07:55, Mark Vojkovich wrote: On Tue, 23 Sep 2003, Nathan Hand wrote: On Tue, 2003-09-23 at 05:58, Mark Vojkovich wrote: Can we export to the drivers some function that yields the CPU? Currently alot of drivers burn the CPU waiting for fifos, etc...

Re: Exporting sched_yield to the drivers

2003-09-22 Thread Mark Vojkovich
On Tue, 23 Sep 2003, Nathan Hand wrote: On Tue, 2003-09-23 at 07:55, Mark Vojkovich wrote: On Tue, 23 Sep 2003, Nathan Hand wrote: On Tue, 2003-09-23 at 05:58, Mark Vojkovich wrote: Can we export to the drivers some function that yields the CPU? Currently alot of drivers burn