Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 249634 - init wakes up every 5 seconds
init wakes up every 5 seconds
Product: Fedora
Classification: Fedora
Component: sysvinit (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Bill Nottingham
Fedora Extras Quality Assurance
Depends On:
Blocks: wakeup
  Show dependency treegraph
Reported: 2007-07-25 18:06 EDT by Scott Lamb
Modified: 2014-03-16 23:07 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-02-29 19:30:57 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
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.

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