Hello Frank
On Thursday 22 May 2003 22:11, Frank Hemer wrote:
> I tried to post this to the mailing-list, but unfortunatelly, it didn't
> appear. So I'll try direct ...
As you might have noticed, your message has since appeared on the mailing
list, albeit with the subject "Mail delivery failed: returning message to
sender".
> I'm core developer of a cvs frontend (http://www.lincvs.org), and have just
> recently included fam support.
Nice to hear.
> When using fam, I realized the FamNextEvent routine throwing errors and
> crashing when monitoring more than at about 200 directories.
I've heard about such a problem before, but haven't made the time to
investigate why it is occuring. It's definitely a problem I'd like to fix
soon, so any input is most welcome.
> It appeared to me, that fam (or fileschanged/dnotify???) was eating up a
> lot of fd's.
Yes, unfortunately this is the way that DNotify works, and FAM on most
GNU/Linux distributions uses DNotify.
> So finally I decided to write my own kernel notifier, and patch it into
> fam. I built it as a kernel module (linux;-), that hooks into the
> sys_calls, and writes events to /dev/fwatch. The required select routine to
> read the events seemed to be quite close to the one imon uses, so I just
> hacked the code into IMonNone.c++ and IMon.c++.
When FAM was first open sourced, SGI made available a version of IMon for
Linux (as you will see). After I became aware of the Linux DNotify API in
Linux 2.4, I started recommending that people use Alex Larsson's DNotify
patch on Linux so I wouldn't have to maintain an IMon kernel patch for each
Linux kernel release and so users could get acceptable performance from FAM
without patching their kernel. Since suggesting people use DNotify, it has
become apparent that it has some limitations. :-(
It's intriguing that you've provided another monitor. I'll have a look at it,
and place it the contrib directory of our FTP site if it seems usable.
Thanks for sending it.
> With these changes, fam seems to be able to handle real huge projects
> without problem;-).
This suggests to me that the ~ 200 directory limit might be related to
DNotify. I'll investigate that idea.
> One more thing I reallized:
> When removing a whole bunch of registered directories (I tried with about
> 1200) and re-registering them right after, fam still reports changes to
> these dirs.
Sounds like a bug. I'll check it out when I find time.
Thanks
--
Michael Wardle
Adacel Technologies
|