Bug 249634 - init wakes up every 5 seconds
Summary: init wakes up every 5 seconds
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: sysvinit
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: wakeup
TreeView+ depends on / blocked
 
Reported: 2007-07-25 22:06 UTC by Scott Lamb
Modified: 2014-03-17 03:07 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-03-01 00:30:57 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Scott Lamb 2007-07-25 22:06:45 UTC
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-26 02:30:28 UTC
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 04:34:37 UTC
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-03-01 00:30:57 UTC
'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.