From: Robert Schedel <r.schedel@yahoo.de>
To: linux-dvb@linuxtv.org
Subject: Re: [linux-dvb] High CPU load in "top" due to budget_av slot polling
Date: Sun, 20 Apr 2008 21:12:40 +0200 [thread overview]
Message-ID: <480B95A8.5050607@yahoo.de> (raw)
In-Reply-To: <200804180234.34558@orion.escape-edv.de>
Oliver Endriss wrote:
> 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
OK, I just took the time to make a more reliable test series (because
load measurements varied). All nonessential system processes and modules
were terminated before the test. Basically, only the login shell and the
budget_av module were left. 1 minute uptime was used for measurements.
Kernel: Linux 2.6.25
HW: Athlon 64 X2 3800+, Satelco EasyWatch DVB-C (as before)
1. Original module budget_av is loaded:
Load: ~0,6-0,8
2. Module + Patch "saa7146_sleep.diff" (1ms/10ms polling intervals in
debi_done function):
Load: ~0,6-0,8 (same as in 1., no difference visible)
3. Module + Patch "incr-empty-ca-slot-poll-2.6.24.4.patch" (5s polling
timer on slot state EMPTY):
Load: Decays to 0,02, but after about 105s always a spike to 0,10, then
again decays to 0,02, and so on
4. Module + Patch "incr-empty-ca-slot-poll" + "saa7146_sleep.diff":
Same as 3.
5. Module + Patch "incr-empty-ca-slot-poll" + "binary exponential backoff":
Same as 3.
6. Module budget_av is unloaded:
Load constantly stays at 0, no spikes
Bottomline for me:
- Increasing the poll timer from 100ms, e.g. to 5s, makes sense.
Changing the polling intervals in the debi_done function, however, makes
no difference (unlike my previous assumption which was caused by the
ugly variations).
- There seems to be a spike in the CPU load, each ~105s, but only when
budget_av is loaded. I cannot explain it (maybe some frontend background
functions), but it is no issue for me.
Regards,
Robert
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
next prev parent reply other threads:[~2008-04-20 19:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-07 9:29 [linux-dvb] High CPU load in "top" due to budget_av slot polling Robert Schedel
2008-04-08 7:26 ` Robert Schedel
2008-04-12 0:11 ` Oliver Endriss
2008-04-11 23:00 ` Oliver Endriss
2008-04-16 21:28 ` Robert Schedel
2008-04-17 11:12 ` Guy Martin
2008-04-17 15:27 ` Robert Schedel
2008-04-18 0:34 ` Oliver Endriss
2008-04-20 19:12 ` Robert Schedel [this message]
2008-04-18 1:21 ` Oliver Endriss
2008-04-18 2:44 ` hermann pitton
2008-04-20 19:43 ` Robert Schedel
2008-04-20 23:25 ` Oliver Endriss
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=480B95A8.5050607@yahoo.de \
--to=r.schedel@yahoo.de \
--cc=linux-dvb@linuxtv.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.