Bug 204725 - hplip wakes up every half second
Summary: hplip wakes up every half second
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: hplip
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: FC6Target wakeup
TreeView+ depends on / blocked
 
Reported: 2006-08-31 08:40 UTC by Arjan van de Ven
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version: 1.6.7-4
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-10-03 15:34:49 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Arjan van de Ven 2006-08-31 08:40:50 UTC
Description of problem:

hplip has a loop that wakes up every half second.
We're working on making the kernel tickless for power management reasons, which
of course is no gain if various userspace apps keep waking the processor up all
the time. In runlevel 3, hpssd is one of the bigger wakers. (half a second may
sound nitpicky, but if there are 2 dozen places doing it it's still a mess).

As far as I can see from the code this timeout is just used for a select()
timeout, and any event that comes in on the sockets earlier will wake the app up
anyway, so half a second is way overkill. In fact it's not quite clear to me why
the select() can't just be unlimited, but ok. The patch below as proof of
concept turns the 0.5s into 5 seconds... but I'd love to see it even longer...


--- hpssd.py~   2006-08-31 10:21:35.000000000 +0200
+++ hpssd.py    2006-08-31 10:21:35.000000000 +0200
@@ -1474,7 +1474,7 @@
     try:
         log.debug("Starting async loop...")
         try:
-            loop(timeout=0.5)
+            loop(timeout=5.0)
         except KeyboardInterrupt:
             log.warn("Ctrl-C hit, exiting...")
         except Exception:

Comment 1 Tim Waugh 2006-12-21 12:39:33 UTC
This patch is now accepted upstream, but they didn't respond to 'why does it
need to time out at all?'; I'll keep trying with it.


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