glib/gio/inotify
Ryan Lortie c5d5e2916b inotify: implement "boredom" algorithm
Use the "interesting" value from g_file_monitor_source_handle_event() to
decide if we're currently being flooded by a stream of boring events.

The main case here is when one or more files is being written to and the
change events are all being rate-limited in the GFileMonitor frontends.

In that case, we become "bored" with the event stream and add a backoff
timeout.  In the case that it is exactly one large file being written
(which is the common case) then leaving the event in the queue also lets
the kernel perform merging on it, so when we wake up, we will only see
the one event.  Even in the case that the kernel is unable to perform
merging, the context switch overhead will be vastly reduced.

In testing, this cuts down on the number of wake ups during a large file
copy, by a couple orders of magnitude (ie: less than 1% of the number of
wake ups).
2015-03-20 12:01:35 -04:00
..
ginotifydirectorymonitor.c substantially rework file monitors 2015-03-20 11:59:47 -04:00
ginotifydirectorymonitor.h Updated FSF's address 2014-01-31 14:31:55 +01:00
ginotifyfilemonitor.c substantially rework file monitors 2015-03-20 11:59:47 -04:00
ginotifyfilemonitor.h substantially rework file monitors 2015-03-20 11:59:47 -04:00
inotify-helper.c inotify: implement "boredom" algorithm 2015-03-20 12:01:35 -04:00
inotify-helper.h Updated FSF's address 2014-01-31 14:31:55 +01:00
inotify-kernel.c inotify: implement "boredom" algorithm 2015-03-20 12:01:35 -04:00
inotify-kernel.h inotify: implement "boredom" algorithm 2015-03-20 12:01:35 -04:00
inotify-missing.c Updated FSF's address 2014-01-31 14:31:55 +01:00
inotify-missing.h Updated FSF's address 2014-01-31 14:31:55 +01:00
inotify-path.c inotify: implement "boredom" algorithm 2015-03-20 12:01:35 -04:00
inotify-path.h inotify: implement "boredom" algorithm 2015-03-20 12:01:35 -04:00
inotify-sub.c substantially rework file monitors 2015-03-20 11:59:47 -04:00
inotify-sub.h substantially rework file monitors 2015-03-20 11:59:47 -04:00
Makefile.am substantially rework file monitors 2015-03-20 11:59:47 -04:00