[ck] Re: Threading issues? [[email protected]: ck Digest, Vol 3, Issue 16]

Con Kolivas kernel at kolivas.org
Fri Jan 14 10:30:28 CST 2005


Ove Kaaven wrote:
> fre, 14,.01.2005 kl. 13.06 +1100, skrev Con Kolivas:
> 
>>Well the scheduler is not going to be rewritten any time soon (trust me, 
>>I've tried :P). Tell me what remaining requirements your threads have 
>>that you are unable to achieve at the moment and I'll see if I can help 
>>with my understanding of the priority system as it is, in a generic way 
>>that hopefully will work across scheduler designs.
> 
> 
> The biggest problem is that there is no way to say to the kernel that
> one thread is more important than another without permanently renicing
> all other threads. A potential kernel solution to the problem would be
> to implement process scoping in the kernel, i.e.
> 
> pthread_attr_setscope(attr, PTHREAD_SCOPE_PROCESS)
> 
> and then allow threads scoped this way to be set to high priority, since
> with a process scope, these threads should only preempt other threads in
> the same process (i.e. Wine), not threads run by other Linux apps, and
> thus the security concerns of elevated priority threads are irrelevant.
> 
> Allowing a process-scoped thread to set the scheduling policy to
> SCHED_RR in order to inhibit the kernel's interactivity priority boost
> system would also help.

I had proposed a fixed priority scheduling class on the linux kernel 
mailing list for just such an occasion. However noone noticed or seemed 
interested. The patch is in the lkml archives and would be trivial to 
re-implement. Would this be helpful? I know Ingo Molnar certainly saw a 
need for such a patch after I described a different issue that could be 
helped with it.

Cheers,
Con
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20050115/c5052104/signature.pgp


More information about the wine-devel mailing list