-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
controller & notify events queue code improvements #35
Conversation
wulf7
commented
Feb 27, 2016
- fix signal handling issue https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204366
- Some controller fixes and improvements. Stress test is not included as it is unportable now :-(
- inotify events queue code is completed so https://github.com/idea4bsd/fsnotifier/issues/1 is fixed
Asyncronous signal handlers should not be called from worker thread context to not interfere with main application. See [1] for example. Moreover libinotify in current state do not use any syncronous signals. So we can block em all not only SIGPIPE [1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204366
This allows worker thread not wait for user thread so its possible to unconditionaly call signaling function at watch closing
as it makes user<->worker interactions harder to understand
Compare io[INOTIFY_FD] with -1 instead of
to allow parallel command execution on different workers. Commands for the same worker are serialized with worker`s own mutex
All threads of stress test run in parallel now.
This allows to avoid executing commands in wrong workers while stress-testing caused by quick reopen of inotify instances with the same id
This should prevent blocking of worker thread on socket write caused by send buffer overflow if no readers exists. It can happen e.g. on mass-removing of watches when lot of IN_IGNORED events are generated but noone need them. https://github.com/idea4bsd/fsnotifier/issues/1
That should prevent blocking of working thread on writting of inotify events to user`s socket when amount of data to be written exceedes free socket buffer space
or with SO_NOSIGPIPE socket option. Hopefully, this fixes [1] on all modern BSDs [1]. #8
It seems not all OSes support -1 as GID number
Hmmm. Some development code leaked (last 3 commits). So I overwrote it with up to date versions with forced push to not spoil the commit history |
So many changes, thanks Vladimir, will definitely merge it soon! |
Closing of duped file descriptors should not produce any notifications until close of last descriptor referenced a file
Improved version of it has already been commited to FreeBSD source tree as r298982. Improvements are: 1. Split NOTE_CLOSE on NOTE_CLOSE and NOTE_CLOSE_WRITE events to be able to separate readers from writers and match Linux inotify interface. 2. Emit NOTE_READ on readdir operation 3. Dont send NOTE_CLOSE from vgonel() on device unmounting https://svnweb.freebsd.org/base?view=revision&revision=298982
It has already been commited to FreeBSD source tree as r298922 https://svnweb.freebsd.org/base?view=revision&revision=298922
Hi, Dmitry. |
Hi Vladimir, Sorry for a delay. Your efforts will never go to the thrash can! Here is what I can do. Please push all your work here: https://github.com/libinotify-kqueue/libinotify-kqueue I will put a notice in my repository that it is not "official" anymore. Dmitry |
Thank you. I have pushed master branch here |
master repository has been moved to https://github.com/libinotify-kqueue/libinotify-kqueue |