[SDL] Re: X11 again
pphaneuf at sx.nec.com
Wed Apr 5 09:40:35 PDT 2000
Mattias Engdegård wrote:
> > NT got better performance under heavy loads
> > thanks to some nasty scheduler tricks. Specifically, when a client
> > sent a drawing request to the server, it could use a system call that
> > would DEMAND the server thread to be run next, bypassing all other
> > threads waiting for the CPU. One could theoretically implement this
> > on Linux by, say, adding a system call to switch right to the server,
> > instead of what the scheduler has planned.
> Aw... just to get rid of a reschedule? I don't think it pays off.
> If the only eligible process is the newly woken up X server, that is going
> to be very fast anyway. The scheduler cost drowns in the cost of a context
> switch (switch + TLB flush + cache effects).
True, thinking about this, in a system doing only this (no daemon or
other process trying hard to run), after doing an operation, there is
probably only one other process on the run queue, the X server itself
(which is marked for wake up from it's 'select()').
One thing that *might* be good is a mechanism I heard some OSes had,
that you could map a whole running process just like a .so and call
entry points in your own context...
More information about the SDL