Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: Kernel-Patch to make VDR undisturbable



Andreas Schultz (aschultz@cs.uni-magdeburg.de) schrieb:
> rt sheduling still allows the program to 
> wait for I/O operations and to give up it's time slice.

But if the programm does not want to give up the time-slice it will be chosen 
by the scheduler again and lock out any lower-priority process for the CPU.


> During wait for I/O 
> operations, the kernel will automaticly (as always) give the CPU to some 
> other process.

Only if there are no other realtime processes on the runqueue. With two DVB-
cards VDR uses up to 9(?) processes, which would be scheduled next if one of 
them is willing to get the CPU. One bug in VDR could hang the whole computer.


> If you have to wait inside the program you just have to avoid 
> busy wait loops.

ACK.


> Doing this is not really difficult.

ACK


> Things like blocking reads/writes, poll/select, mutex_lock() on locked 
> mutexes, cond_wait will automaticly allow lower priority processes to run.

Imagine a slow box like mine, which may not have the power to complete the 
operations in the kernel (may be heavy network I/O) and VDR (i.e. doing time-
shifting) at the same time. In this case the box would be blocked until I 
plug off the network or stop VDR which might be impossible in this case, 
because I can not interact with VDR. RT-processes which do not guarantee the 
return of the CPU to SCHED_OTHER processes within a short time frame will 
make it hard to use the box for any user interaction.


> I have tested my buffer syncing patch with SCHED_FIFO and it works so far. 
> Even heavy disk activity during replay doesn't disturb the output any more.

Sounds good. Go ahead with your work. I am willing to try you solution.


> IMHO, this is not as difficult as you suggest. Much of it will only be a 
> cleanup the current locking and syncing stuff - which is needed anyway.

I am not as optimistic as you. It is a complex programm, and you have to make 
sure that under any circumstance VDR will not take full use of its time-
slices while on the runqueue.


Matthias.



Home | Main Index | Thread Index