On Tue, Dec 16, 2003 at 06:54:22PM -0700, Slepp Lukwai wrote: > As a side note, I'm also using a 200Hz timer, instead of the standard > 100Hz. Though I don't see this doing anything but making it quicker, as > it reduces latency on scheduling, while slightly increasing scheduler > overhead and context switching (or is an SSE/3Dnow! CS really expensive, > anyone know?).
A 200Hz timer will have only one effect on batch type processes, slowing them down. And mpeg2enc is essentially a batch type process. Why? Because of the increased scheduler overhead. Now, you may be hard put to measure the slowdown because so many other effects will swamp it (one HD seek that takes a few ms would swamp a large part of the scheduler overhead) but it's still there. The only thing that's "quicker" with a 200hz timer is interactive response where you want to see your X cursor move the instant you touch the mouse. Yes, context switching (at least for SSE) is more expensive, because the 8 128bit SSE registers may need to be saved. I don't know off the top of my head if Intel implimented lazy context saves for SSE like with the x86-fpu stack. If they did, then not all context swaps incur the SSE save overhead, but when one does, there is more data to save. > I wonder if it comes back to the increased timing of the scheduler? > (Though it's using a supposed O(1) scheduler, which should offset > that). The O(1) scheduler does not change the context switch overhead timing. The O(1) scheduler simply says that no matter how many processes are waiting to run, it's a constant time to find the "next" one when we do need to context switch. But a 200hz timer will still use up 2x as much cpu time running the scheduler as 100hz timer will. ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ Mjpeg-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/mjpeg-users