Mailing List archive

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

[vdr] RFC - realtime scheduling for VDR-1.1.12



Hi all,

ok, lets try that again. 

Summary:

I have prepared a patch that allows one to run vdr-1.1.12 and it's thread 
under realtime priorities.

The patch is at: http://warp10.net/dvd/plugin-devel/vdr-1.1.12-rt.diff.bz2

rt-Scheduling can be activated with the '-R' commandline switch and can only 
be used with root rights.

Description:

Running a process under realtime priorities gives that proecess priority above 
anything else and it guarantees that no lower priority task can preempt that 
process. Realtime processes are guaranteed to get scheduling timeslices even 
under very high CPU load situations.
The patch exploits this by running all user interactive threads with maximum 
priorities thereby improving responsivness under high load.
The patch does not (and can not) change I/O throughput. The Linux I/O 
scheduler does currently not support any prioritisation of I/O requests. 
Distortions due to high I/O load will therefore not be cured by this patch.

The changes to cThread and cMutex _will_ break all plugins. This is 
intentional! rt-Scheduling adds additional problems and pitfalls to 
multithreading. A rt-Thread stuck in an endless loop is almost impossible to 
terminate and will lockup your entire system. - You have been warned -

Changes important for developers:

- cMutex is no longer recursive by default
- cCondVar can no longer be used with recursive Mutexes (POSIX default!)
- usleeps  <= 2us should be avoided, those are implemented as busy waits in 
   the Linux scheduler
- thread's should not sleep/usleep with locks held (doing so is not an error, 
   but increases scheduling latency and decreases interactive responsivness)

Andreas


--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index