[linux-dvb] High CPU load in "top" due to budget_av slot polling

Oliver Endriss o.endriss at gmx.de
Fri Apr 18 02:34:33 CEST 2008

Robert Schedel wrote:
> Robert Schedel wrote:
> > Is the 250ms timeout an approved limit? Decreasing it would push the
> > load further down. Probably it still has to cover slow CAMs as well as a
> > stressed PCI bus. Unfortunately, without CAM/CI I cannot make any
> > statements myself.
> Just got another idea to improve the code: Function 
> "saa7146_wait_for_debi_done_sleep" could be reworked to use what is 
> known as "truncated binary exponential backoff" algorithm. IOW, on each 
> sleep duplicate the period from 1ms until a fixed maximum, e.g. 32ms. 
> This way polling ends fast for those users with fast bus/CAM, and those 
> requiring 200ms due to slow bus/CAM should not worry about e.g. 216ms 
> response time.
> My first tests look promising (load goes down to 0). However, is not the 
> simple BEB algorithm already patented?

Load should go down to 0 if the sleep call does not busy-wait.

Please test whether the attached code fixes the problem.
Btw, I will not claim a patent for that. :D


VDR Remote Plugin 0.4.0: http://www.escape-edv.de/endriss/vdr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: saa7146_sleep.diff
Type: text/x-diff
Size: 1029 bytes
Desc: not available
Url : http://www.linuxtv.org/pipermail/linux-dvb/attachments/20080418/a1ef74ad/attachment-0001.diff 

More information about the linux-dvb mailing list