[Xprint] Re: Unified video+print Xserver / was: Re: Modularization mailing list and initial strawman proposal

Adam Jackson ajax at nwnk.net
Tue Mar 29 10:49:42 PST 2005


On Tuesday 29 March 2005 07:58, Julien Lafon wrote:
> On Sun, 27 Mar 2005 11:00:58 +0200, Egbert Eich <eich at suse.de> wrote:
> > Having video and print active in a single threaded Xserver would force
> > video output to wait for the print rendering to finish.
>
> Xprint applications are scheduled by the X server as normal X clients
> and do not behave differently. I do not see a different of having two
> video cards or one video card and a print screen in one Xserver.

Then you don't understand the problem.  See, for example:

https://bugs.freedesktop.org/show_bug.cgi?id=1426

X's scheduler is not preemptive.  When it schedules a client, that client is 
going to run to the completion of at least one request in its queue.  With 
core X this is not a huge deal, because each request is simple.  With GLX 
this can be a problem, because "one request" can be "draw these 40,000 
multitextured supersampled quad strips".  Oops.

My understanding of Xprint is that the invoked lpd (or whatever) is not 
scheduled like an X client but is instead treated like an output device.  
Which means you can have a situation where the server has a huge chunk of 
data (say, a rasterised page of A4 at 600dpi), and is blocking trying to move 
that data out to the lpd.  When you're blocked on output then you don't 
return to the scheduling loop in small bounded time.  Which means the server 
appears to stall.

Such is the joy of cooperative multitasking.

Now if you have separate servers for print and display, then the kernel gets 
to schedule them, and the kernel's scheduler is preemptive.  So when Xprt 
gets blocked waiting for the printer, the kernel switches to a process that 
is runnable but halted.

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.x.org/archives/xorg-arch/attachments/20050329/6e143d83/attachment.pgp


More information about the xorg-arch mailing list