Hello, Is anybody there? :)
Regards Zbigniew Dnia 19-01-2006, czw o godzinie 20:36 +0100, Zbigniew Chyla napisaĆ: > Hi, > > I'm working on Linux 2.6.15 with inotify support enabled, so I couldn't > understand why gam_server sometimes shows on "top" even if the machine is > idle and the filesystem doesn't change at all (at least in directories that > gamin clients may be interested in). > After running strace I found out that that gam_server wakes up tens times > per second (because of calling poll(2) with very short timeouts) when > nothing changes in the filesystem! > > The attached patches (with included ChangeLog entries) fix this behaviour > by switching from static registrations of timeout functions to more dynamic > approach (executing timeout function that processes some queue makes sense > only if the queue is not empty). > > gamin-inotify.diff: > Introduces dynamic handling for events_to_process, missing_list and > links_list. > > gamin-connections.diff: > Dynamic handling of per-connection GamConnDataPtr->eq queue and detection > of idle period. > As a side effect this change improves idle detection mechanism. With this > patch the server quits if the connections queue is really empty for 30 > seconds. Previously the timeout function was only "sampling" state of the > queue so it could miss a client connection shorter than 1 second. > > gamin-pool-basic.diff: > Dynamic handling of lists of resources from gam_poll_generic.c used inside > gam_poll_basic.c. Registering gam_poll_basic_scan_callback statically makes > no sense because it seems that with inotify this code is not used at all > (anyway, the timeout function will be registered dynamically if needed). > > Additionally I attached a simple patch (gamin-time-syscall.diff) that lets > you avoid calling time(2) syscall too often (twice per each stat(2) on > symlink or missing file). > > > Regards > Zbigniew > > _______________________________________________ > Gamin-list mailing list > [email protected] > http://mail.gnome.org/mailman/listinfo/gamin-list _______________________________________________ Gamin-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gamin-list
