Bug 204725
| Summary: | hplip wakes up every half second | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Arjan van de Ven <arjan> |
| Component: | hplip | Assignee: | Tim Waugh <twaugh> |
| Status: | CLOSED RAWHIDE | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | rawhide | ||
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | 1.6.7-4 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2006-10-03 15:34:49 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 150223, 204948 | ||
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. |
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: