[ck] Re: Threading issues? [ck-request@vds.kolivas.org: ck Digest, Vol 3, Issue 16]

Jeremy White jwhite at codeweavers.com
Thu Jan 13 23:18:15 CST 2005

[snipping further proof that I don't understand a wide range of issues <g>]
>> Fourth, based on your reply to my earlier email, I suspect I do
>> not understand how time quanta are assigned.  In fact, I had come to
>> some conclusions at one point last fall, that I can no longer
>> convince myself of (I was persuaded that a thread that constantly
>> yielded had it's time quanta dranstically reduced; I can no longer
>> reproduce that).  Further, time quanta differences can be crippling to 
>> Wine.
>> Photoshop, for example, relies on reliable 5ms timing, and if it doesn't
>> get it, it doesn't work.  Similarly, I could swear I had a problem
> That can't be true. What you are saying is it needs at least 5ms 
> timeslice on hardware that is equal to or faster than the machine you 
> tested it on. We cannot guarantee any timeslice of any size will occur 
> uninterrupted in the linux kernel. For tasks that are not nice'd, the 
> usual minimum slice is 10ms. But if something higher priority than it 
> wakes up in the interim, it will be preempted even if it is 50 
> microseconds into its timeslice.

No, it is true.  Your typical Photoshop user relies on the fact
that Photoshop is the only application of any priority on the machine;
Photoshop has a thread that runs that samples the mouse position every 5 ms;
if it doesn't get it's samples in the right amount of time, you don't
draw smooth curves.  (It may be a timer event callback routine,
or a thread that is woken up by a timer event, I can't recall exactly atm).

I suspect that if you start a heavy compile on a Windows box, Photoshop
won't paint right, just as it wouldn't if you burdened the CPU on Linux.

What we need to protect is the apples to apples case - when Photoshop
is the only app using the CPU with Wine, it needs to draw smoothly, and for that,
it needs to know that the thread it has marked as super duper high
priority will get run every 5 ms as it has requested.

(My gut reaction to this was that it was horrid programming on Adobe's
part; but they are trying to provide extremely fine resolution on drawing,
and their approach makes sense in that context.  I am now persuaded
of their competence <g>).



More information about the wine-devel mailing list