Re: power consumption, powertop and wakups per second with a af9015 device, vp7045, and various plugins

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

 



Hi Antti,
On Wed, Mar 25, 2009 at 10:48:01PM +0200, Antti Palosaari wrote:
> Antti Palosaari wrote:
>> Heinrich Langos wrote:
>>> Moikka Antti,
>>>
>>>> vp7045 does not have PID-filters.
>>>> I think difference comes from different USB-transfer settings. 
>>>> vp7045  uses BULK packet size 4096 and af9015 uses BULK packet size 
>>>> 512 for  USB2.0 and BULK packet size 64 for USB1.1. Therefore 
>>>> af9015 sends 8  times more packets than vp7045 (I guess).
>>>>
>>>> One thing more you can test - use USB1.1. To force USB1.1 remove 
>>>> USB2.0  driver by rmmod ehci_hcd. After that plug af9015 stick and 
>>>> look from  logs it detects USB1.1 and uses PID-filters. af9015 
>>>> driver now uses  smaller packet size for transfer that can change 
>>>> load (bigger?).
>>
>>> seems you are right. The transfer with PID filter in usb 1.1 causes
>>> about 30% load in contrast to 19% with usb 2.0
>>>
>>> is there a way to increase the packet size for those bulk transfers?  
>>> for usb 2.0? for 1.1?
>>
>> Actually AF9015 chip offers registers to configure packet size. But  
>> those which are now used are default ones and rather many devices 
>> (other than af9015) are using just same. That's why I am not sure if I 
>> want change those to bigger ones.
>>
>> I will make test version that uses 4k packets for your tests. If it  
>> resolves problem then we should consider for example adding module 
>> param for setting desirable packet size. I will inform you when test 
>> version is ready - It takes day or two.
>
> Unfortunately 512 seems to be biggest allowed packet size so I cannot  
> increase it. Anyhow, there is other configurable parameter called packet  
> count. I increased that from 348 to 512 but I doubt it does not have any  
> effect. Feel free to test. If it does not change load then I think we  
> cannot do more.
> Test tree:
> http://linuxtv.org/hg/~anttip/af9015_powertop/

Thank you very much for your work and helpful information.
Sorry it took me some time to fire up that stick again.. here's the result:

In short the improvements (if any) are within the error margin. 
The snapshots below seem to indicate that load with pid filter is reduced
somewhat, but i assure you that you get loads from 1.4-1.0 and 22-16%
respectivly. So there seems no gain in changing the packet count constant. 
As usual I have included the details below. 

BTW: I got myself a "Toshiba USB DVB-T Tuner PX1211E-1TVD" based on the
DiB3000M-C/P. Unlike the siemens stick it has a pid filter. 
I only tested it without the pid filter yet, and it seems to perform as 
good as the siemens stick in terms of system load. So I guess it uses big
packets for the bulk transfers.

I hope I'll have some time to test it further this weekend. Hopefully it 
turns out to reduce the system load by the driver to a reasonable level.
If so I will finally get around to look into vdr itself as a cause of
wasted CPU cycles and energy... :-)


cheers
-henrik

Details:


# modprobe -v dvb_usb_af9015
insmod /lib/modules/2.6.26-1-686/kernel/drivers/media/dvb/dvb-core/dvb-core.ko
insmod /lib/modules/2.6.26-1-686/kernel/drivers/media/dvb/dvb-usb/dvb-usb.ko disable_rc_polling=1
insmod /lib/modules/2.6.26-1-686/kernel/drivers/media/dvb/dvb-usb/dvb-usb-af9015.ko
# dmesg | tail
[421479.228321] af9015: recv bulk message failed:-110
[421481.228225] af9015: recv bulk message failed:-110
[421481.236400] dvb-usb: found a 'Afatech AF9015 DVB-T USB2.0 stick' in warm state.
[421481.236940] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
[421481.237973] DVB: registering new adapter (Afatech AF9015 DVB-T USB2.0 stick)
[421481.714270] af9013: firmware version:4.95.0
[421481.724131] DVB: registering adapter 0 frontend 0 (Afatech AF9013 DVB-T)...
[421481.724847] tda18271 0-00c0: creating new instance
[421481.729438] TDA18271HD/C2 detected @ 0-00c0
[421481.994205] dvb-usb: Afatech AF9015 DVB-T USB2.0 stick successfully initialized and connected.
[421482.012365] usbcore: registered new interface driver dvb_usb_af9015
[421992.345780] tda18271: performing RF tracking filter calibration
[421997.798964] tda18271: RF tracking filter calibration complete



====================== no pid filter =========================

zap:
|      PowerTOP version 1.10      (C) 2007 Intel Corporation
| 
| Cn                Avg residency       P-states (frequencies)
| C0 (cpu running)        (30.8%)          750 Mhz     0.0%
| polling           0.2ms ( 0.0%)          563 Mhz     0.0%
| C1 halt           0.0ms ( 0.0%)          375 Mhz     0.0%
| C2                0.4ms ( 7.3%)          188 Mhz   100.0%
| C3                0.2ms (61.9%)
| 
| Wakeups-from-idle per second : 3100.6   interval: 10.0s
| no ACPI power usage estimate available
| 
| Top causes for wakeups:
|   60.5% (4774.2)   USB device  5-1 : DVB-T 2 (Afatech)
|   39.3% (3107.5)       <interrupt> : uhci_hcd:usb1, HDA Intel, ehci_hcd:usb5
|    0.1% (  5.7)               zap : schedule_timeout (process_timeout)
|    0.0% (  2.0)           xfsaild : schedule_timeout (process_timeout)
|    0.0% (  1.6)           xfsbufd : schedule_timeout (process_timeout)
|    0.0% (  1.2)           syslogd : ehci_irq (ehci_watchdog)
|    0.0% (  1.0)               zap : do_nanosleep (hrtimer_wakeup)
|    0.0% (  1.0)          ifconfig : b44_open (b44_timer)

vdr:
|      PowerTOP version 1.10      (C) 2007 Intel Corporation
| 
| Cn                Avg residency       P-states (frequencies)
| C0 (cpu running)        (34.6%)          750 Mhz     0.0%
| polling           0.0ms ( 0.0%)          563 Mhz     0.0%
| C1 halt           0.0ms ( 0.0%)          375 Mhz     0.0%
| C2                0.1ms ( 0.5%)          188 Mhz   100.0%
| C3                0.3ms (64.9%)
| 
| Wakeups-from-idle per second : 2588.7   interval: 10.0s
| no ACPI power usage estimate available
| 
| Top causes for wakeups:
|   59.3% (4318.9)   USB device  5-1 : DVB-T 2 (Afatech)
|   37.5% (2730.5)       <interrupt> : uhci_hcd:usb1, HDA Intel, ehci_hcd:usb5
|    3.0% (220.9)               vdr : futex_wait (hrtimer_wakeup)
|    0.1% (  6.2)               vdr : schedule_timeout (process_timeout)
|    0.0% (  2.0)           xfsaild : schedule_timeout (process_timeout)
|    0.0% (  1.6)           xfsbufd : schedule_timeout (process_timeout)
|    0.0% (  1.3)           syslogd : ehci_irq (ehci_watchdog)
|    0.0% (  1.1)               vdr : hrtick_set (hrtick)
|    0.0% (  1.0)               vdr : do_nanosleep (hrtimer_wakeup)
|    0.0% (  1.0)          ifconfig : b44_open (b44_timer)



====================== with hw pid filter =========================

# modprobe -v dvb-usb force_pid_filter_usage=1
insmod /lib/modules/2.6.26-1-686/kernel/drivers/media/dvb/dvb-core/dvb-core.ko
insmod /lib/modules/2.6.26-1-686/kernel/drivers/media/dvb/dvb-usb/dvb-usb.ko force_pid_filter_usage=1 disable_rc_polling=1
# modprobe -v dvb_usb_af9015
insmod /lib/modules/2.6.26-1-686/kernel/drivers/media/dvb/dvb-usb/dvb-usb-af9015.ko


zap:
|      PowerTOP version 1.10      (C) 2007 Intel Corporation
| 
| Cn                Avg residency       P-states (frequencies)
| C0 (cpu running)        ( 1.1%)          750 Mhz     0.0%
| polling           0.0ms ( 0.0%)          563 Mhz     0.0%
| C1 halt           0.0ms ( 0.0%)          375 Mhz     0.0%
| C2                0.0ms ( 0.0%)          188 Mhz   100.0%
| C3               10.6ms (98.9%)
| 
| Wakeups-from-idle per second : 95.7     interval: 15.0s
| no ACPI power usage estimate available
| 
| Top causes for wakeups:
|   48.8% ( 70.1)       <interrupt> : uhci_hcd:usb1, HDA Intel, ehci_hcd:usb5
|   33.2% ( 47.7)   USB device  5-1 : DVB-T 2 (Afatech)
|    7.0% ( 10.1)           syslogd : ehci_irq (ehci_watchdog)
|    4.7% (  6.8)               zap : schedule_timeout (process_timeout)
|    1.4% (  2.0)           xfsaild : schedule_timeout (process_timeout)
|    1.2% (  1.7)           xfsbufd : schedule_timeout (process_timeout)
|    0.7% (  1.1)    kdvb-ad-0-fe-0 : schedule_timeout (process_timeout)
|    0.7% (  1.0)          ifconfig : b44_open (b44_timer)
|    0.7% (  1.0)               zap : do_nanosleep (hrtimer_wakeup)
 
 
vdr:
|      PowerTOP version 1.10      (C) 2007 Intel Corporation
| 
| Cn                Avg residency       P-states (frequencies)
| C0 (cpu running)        (16.8%)          750 Mhz     0.0%
| polling           0.1ms ( 0.0%)          563 Mhz     0.0%
| C1 halt           0.0ms ( 0.0%)          375 Mhz     0.0%
| C2                0.1ms ( 0.3%)          188 Mhz   100.0%
| C3                0.9ms (82.9%)
| 
| Wakeups-from-idle per second : 938.4    interval: 10.0s
| no ACPI power usage estimate available
| 
| Top causes for wakeups:
|   48.6% (988.7)   USB device  5-1 : DVB-T 2 (Afatech)
|   39.5% (804.2)       <interrupt> : uhci_hcd:usb1, HDA Intel, ehci_hcd:usb5
|   10.9% (221.1)               vdr : futex_wait (hrtimer_wakeup)
|    0.3% (  6.9)           syslogd : ehci_irq (ehci_watchdog)
|    0.3% (  6.0)               vdr : schedule_timeout (process_timeout)
|    0.1% (  2.0)           xfsaild : schedule_timeout (process_timeout)
|    0.1% (  1.6)           xfsbufd : schedule_timeout (process_timeout)
|    0.0% (  1.0)          ifconfig : b44_open (b44_timer)
|    0.0% (  1.0)               vdr : do_nanosleep (hrtimer_wakeup)
 


_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux