unity-applications-daemon adds inotify watches on non-existent paths every 4 seconds
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
The Ubuntu Power Consumption Project |
New
|
Undecided
|
Unassigned |
Bug Description
I've notices that unity-applicati
poll([{fd=3, events=POLLIN}, {fd=21, events=POLLIN}, {fd=22, events=POLLIN}], 3, 3996) = 0 (Timeout)
read(3, 0x7fff0cdef780, 16) = -1 EAGAIN (Resource temporarily unavailable)
inotify_
inotify_
inotify_
inotify_
inotify_
inotify_
I'm guessing the logic is that these paths may suddenly appear and get populated, hence the periodical poll to add these inotify watches. However, if we don't expect these paths to appear then the polling is a little bit overzealous.
If we do expect these paths to appear during the lifetime of the daemon then perhaps we should be adding inotify watches on the parts of the paths that do exist and then observing new directories being created and add the inotify watch events on these newly created paths only once they are created.
As it is, this is adding slightly to the overall system wakeups, so it is marginal, however, it could be improved to reduce the wakeups with a little more thought.