Bug 246341 - newhidups wakes up 1000 times per second
newhidups wakes up 1000 times per second
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: nut (Show other bugs)
7
i386 Linux
low Severity low
: ---
: ---
Assigned To: Tomas Smetana
Fedora Extras Quality Assurance
:
Depends On:
Blocks: wakeup
  Show dependency treegraph
 
Reported: 2007-06-30 14:16 EDT by Fabrice Bellet
Modified: 2008-01-25 06:01 EST (History)
1 user (show)

See Also:
Fixed In Version: 2.2.1-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-01-25 06:01:10 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Fabrice Bellet 2007-06-30 14:16:08 EDT
Under powertop, newhidups generates a large amount of wakeups/second:

Wakeups-from-idle per second : 2381.6
no ACPI power usage estimate available

Top causes for wakeups:
  65.9% (936.8)         newhidups : schedule_timeout (process_timeout) 
[...]

Here is a strace sample:

20:12:13 select(87, NULL, [], NULL, {0, 1000}) = 0 (Timeout)
20:12:13 gettimeofday({1183227133, 69667}, NULL) = 0
20:12:13 ioctl(86, USBDEVFS_REAPURBNDELAY, 0xbfaed4f8) = -1 EAGAIN (Resource
temporarily unavailable)
20:12:13 select(87, NULL, [], NULL, {0, 1000}) = 0 (Timeout)
20:12:13 gettimeofday({1183227133, 70666}, NULL) = 0
20:12:13 ioctl(86, USBDEVFS_REAPURBNDELAY, 0xbfaed4f8) = -1 EAGAIN (Resource
temporarily unavailable)
20:12:13 select(87, NULL, [], NULL, {0, 1000}) = 0 (Timeout)
20:12:13 gettimeofday({1183227133, 71692}, NULL) = 0
20:12:13 ioctl(86, USBDEVFS_REAPURBNDELAY, 0xbfaed4f8) = -1 EAGAIN (Resource
temporarily unavailable)
20:12:13 select(87, NULL, [], NULL, {0, 1000}) = 0 (Timeout)
20:12:13 gettimeofday({1183227133, 72667}, NULL) = 0
20:12:13 ioctl(86, USBDEVFS_REAPURBNDELAY, 0xbfaed4f8) = -1 EAGAIN (Resource
temporarily unavailable)
20:12:13 select(87, NULL, [], NULL, {0, 1000}) = 0 (Timeout)
20:12:13 gettimeofday({1183227133, 73745}, NULL) = 0
[...]

newhidups probably could be more resource-friendly.
Comment 1 Tomas Smetana 2007-11-28 08:59:42 EST
I'm not sure that newhidups (or usbhid-ups in nut 2.2.0) could be more
resource-friendly...  They keep polling the ups for changes.  The polling
frequency is configurable (-i parameter) but setting it to high means that any
power-outage or other problem might be discovered too late and nut may not
initiate the shutdown in time.  I'll try to tweak the default frequency.
Comment 2 Fabrice Bellet 2008-01-24 17:40:10 EST
rawhide version 2.2.1 lowered the timeout value from 5000 to 250, so usbhid-ups
now only generates ~100 wakeups per seconds, which is much better :) This bug
can probably be closed now. Will version 2.2.1 be pushed for Fedora 8 eventually ?
Comment 3 Tomas Smetana 2008-01-25 06:01:10 EST
I'll take a look at the new version and if it doesn't break API (I think I saw
something in the new release I didn't like) I will push it into F-8.

Closing the bug as per comment #2.

Note You need to log in before you can comment on or make changes to this bug.