Red Hat Bugzilla – Full Text Bug Listing
|Summary:||init wakes up every 5 seconds|
|Product:||[Fedora] Fedora||Reporter:||Scott Lamb <slamb>|
|Component:||sysvinit||Assignee:||Bill Nottingham <notting>|
|Status:||CLOSED WONTFIX||QA Contact:||Fedora Extras Quality Assurance <extras-qa>|
|Version:||rawhide||CC:||bnocera, mgarski, mozilla_bugs, rvokal|
|Fixed In Version:||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2008-02-29 19:30:57 EST||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Bug Depends On:|
Description Scott Lamb 2007-07-25 18:06:45 EDT
As of sysvinit-2.86-17, init wakes up every 5 seconds. It looks like most of it's time is spent in select() in check_init_fifo(), which has a 5-second timeout. That appears to accomplish two things: 1. lets it poll regularly to see if INIT_FIFO ("/dev/initctl") has changed. This could be replaced with inotify, if it's necessary at all. 2. lets it poll for signals. (If it is in select() when they arrive, it will get an EINTR, but one could arrive between it checking and entering select().) This could be replaced with the "self-pipe trick".
Comment 1 Bill Nottingham 2007-07-25 22:30:28 EDT
Somewhat glib, but if we're getting to the point where an every five second wakeup is an issue, we're doing a lot better than I thought we were. More concretely - does inotify actually work correctly on pipes?
Comment 2 Scott Lamb 2007-07-26 00:34:37 EDT
There are worse ones, but they look harder to fix. :( In particular, I'm mulling over the python-gobject one; there seem to be a bunch of them inside the kernel; and the !@#$@! proprietary VMware tools wake up way too often. But to answer your real question: I don't believe inotify works any differently on named pipes than on any other type of inode. I've never actually used the interface before, but since you asked, I just tried whipping up a test program, and it seems to be doing the right thing. If that path is created/deleted/moved, it says so. That's what init seems to be expecting, though I'm not sure why you'd actually do that.
Comment 3 Bill Nottingham 2008-02-29 19:30:57 EST
'Fixed' with upstart now in rawhide. Setting to wontfix for sysvinit.