Bug 249634

Summary: init wakes up every 5 seconds
Product: [Fedora] Fedora Reporter: Scott Lamb <slamb>
Component: sysvinitAssignee: Bill Nottingham <notting>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: bnocera, mgarski, mozilla_bugs, rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-02-29 19:30:57 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 204948    

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.