server: use a single inotify watch

Mike McCormack mike at codeweavers.com
Thu Feb 16 02:32:15 CST 2006


Before implementing recursive watch on directories, we should switch to 
using a single inotify fd.  inotify puts a per process limit on the 
number of watches we can have (default is 8192) and using an inotify fd 
per watch means we can only watch 8192/N directories with N watches on 
the same directory :/

Some programs add multiple watches on the same directory, and running 
many instances of a program using a recursive watch will cause us to hit 
the limit more quickly without this patch.

Mike


ChangeLog:
Use a single inotify watch, as it scales better with a large number of 
directories.

  server/change.c  |  306 
++++++++++++++++++++++++++++++++++++++++++++++--------
  server/file.h    |    2
  server/main.c    |    1
  server/request.c |    1
  4 files changed, 266 insertions(+), 44 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: d187ca6d91bdb915a273f4fa1ee9bc8a6ece9f29.diff
Type: text/x-patch
Size: 11505 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20060216/9cd20278/d187ca6d91bdb915a273f4fa1ee9bc8a6ece9f29.diff


More information about the wine-patches mailing list