On Wednesday 25 May 2005 12:21, Dr. Werner Fink wrote:
On Wed, May 25, 2005 at 11:43:49AM +0200, castet.matthieu@free.fr wrote:
sched_yield() could not work, because if vdr loop on it, the linux scheduler will think that vdr is an interactive process and will increase its priority and it will be worse.
A solution could be to use nanosleep(1) instead of sched_yield().
nanosleep within threaded programs are emulated with the help of busy loops ... you do not want this ;^)
It does not help to sleep inside as sections get lost with it. I added a view debug statements to this thread. Here are my results without sleep of any type:
channel ~sections/s CPU load in % on P3 700Mhz ARD 300 10 ZDF 100 3 RTL 40 2 Pro7/Sat1 330 46 VIVA 25 2
Changing cFilter::match to reject every section changes load to 0%.
Now changing EIT::Process to do nothing with the sections changes load from 46% to 2%. This means 44% of the 46% are burned in cEITFilter::Process in the swich-case 0x12.
Now the shoking result for me: If i insert a return in cEIT::cEIT before the GetByChannelID the load goes to 2%. If I add the return in cEIT::cEIT after the GetByChannelID the load stays at 46%.
This routine is O(n) and my channels.conf contains 2750 channels. Cutting down the channels.conf to contain only Pro7 load of section handler thread is 3%.
Matthias