Date: Wed, 28 May 2008 16:46:50 +0200 (CEST) From: Oliver Fromme <olli@lurza.secnetix.de> To: freebsd-hackers@FreeBSD.ORG, ivoras@FreeBSD.ORG Subject: Re: Impact of having a large number of open file descriptors Message-ID: <200805281446.m4SEkojn099133@lurza.secnetix.de> In-Reply-To: <g1jjki$6lc$1@ger.gmane.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Ivan Voras wrote: > Im thinking again of the old idea of implementing poor man's file > replication system using kqueue to monitor changes on files. It would be cool to have a kernel interface so you could attach to a mountpoint and receive a log of all activity on that file system. That's similar to what DragonFly's journaling feature does. Unfortunately the kqueue interface isn't capable of doing something like that ... So this is not an answer to your question, I'm afraid. > One other question: do kqueue events "coalesce" in the sense that if N > operations happen (like write()s), there can be < N events passed to the > kqueue (NOTE_WRITE)? The manpage says: "Multiple events which trigger the filter do not result in multiple kevents being placed on the kqueue; instead, the filter will aggregate the events into a single struct kevent." > While at it, will EVFILT_VNODE and NOTE_WRITE catch "additional" ways > the file can be modified, meaning mmap()? A quick grep for NOTE_WRITE on the sys tree indicates that it doesn't. I'm not 100% sure though. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "Documentation is like sex; when it's good, it's very, very good, and when it's bad, it's better than nothing." -- Dick Brandon
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200805281446.m4SEkojn099133>