• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Extra 10 wakeups per second plugging in USD hub, wastes 1W.  (Read 1350 times)
DamonHD
Full Member
***

Karma: 4
Posts: 169


View Profile WWW
« on: September 13, 2009, 07:45:08 AM »

Just plugging in any USB hub (not a USB device) takes me from ~4 wakeups/s to ~14 wakeups/s (on kernel 2.6.30.2, quiet system) which prevents full idling it seems, and eats and extra 1W (I just bought a different hub today to test this theory).

Any idea how to reduce the hub-induced wakeups?  I can't see a tunable parameter.

I can see from lsusb that bInterval seems to be 12, which implies ~8Hz poll if I've understood this correctly: http://www.lvr.com/usbfaq.htm

The Marvell Orion USB drivers seem to have various funnies that may be relevant, eg: https://kerneltrap.org/mailarchive/linux-usb/2008/9/14/3294264/thread

Rgds

Damon
« Last Edit: September 13, 2009, 09:48:46 AM by DamonHD » Logged

DamonHD
Full Member
***

Karma: 4
Posts: 169


View Profile WWW
« Reply #1 on: September 14, 2009, 06:47:26 AM »

OK, I'm measuring (with my E-flite inline meter at just over 5V with 100mA current resolution) about 2.6W with an idle-ish plug with 8GB SD mounted card Ethernet, 3.6W with a two-port hub plugged in and 4.3W with a 4-port plug (that gets slightly warm to the touch after a while).

I can also bump up consumption slightly by pulling a page repeated from the Apache server that I have installed.

Rgds

Damon
Logged

DamonHD
Full Member
***

Karma: 4
Posts: 169


View Profile WWW
« Reply #2 on: September 27, 2009, 07:44:44 AM »

OK, good news.

1) With the new 2.6.31 kernel with CONFIG_USB_SUSPEND=y then an empty hub doesn't eat any appreciable extra power.

2) I've rigged up a moderately-dubious scheme using the automounter that unmounts the USB flash partition when not in use, and brings in up into 'auto' power mode and remounts automagically it on demand, and in the place where I poll from input data from my k8055 card I ensure the k8055 card is put (back) into 'auto' mode which lets it save power, and, unless we have bags of extra juice in the battery, explicitly suspends the USB drive if it's not mounted.  (I do that there because the k8055 code wakes up all the USB devices a bit like lsusb is reputed to.)  There's some locking in there to minimise the chance of messing up the filesystem by a race causing the flash drive to be suspended while a new mount is starting.

http://www.earth.org.uk/note-on-SheevaPlug-setup.html#USB-power

3) I'm in discussions with Alan Stern (da man for Linux USB) and unfortunately this may be the best that can be done, but on the other hand I'm going to see if I can think of a better and more general scheme that can go back into the kernel in the distant future, since my mucking about is definitely unsafe, even if I am the only one using the server and can be very careful about what happens on it.

The upshot is I'm reasonably safe and using 2.5W again most of the time unless the battery is bursting with energy that would otherwise be wasted...

Rgds

Damon
Logged

Pages: [1]
Print
Jump to: