Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 May 2008 18:00:14 +0200
From:      "Ivan Voras" <ivoras@freebsd.org>
To:        freebsd-hackers@freebsd.org, ivoras@freebsd.org
Subject:   Re: Impact of having a large number of open file descriptors
Message-ID:  <9bbcef730805280900i1195b5f4rb879d22e9e0319d9@mail.gmail.com>
In-Reply-To: <200805281446.m4SEkojn099133@lurza.secnetix.de>
References:  <g1jjki$6lc$1@ger.gmane.org> <200805281446.m4SEkojn099133@lurza.secnetix.de>

next in thread | previous in thread | raw e-mail | index | archive | help
2008/5/28 Oliver Fromme <olli@lurza.secnetix.de>:
> 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.

/me agrees.

> 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."

That's mildly unfortunate but I think you're right - it agrees with
the statement from the kqueue paper: "Events will normally considered
to be "level-triggered",
as opposed to "edge-triggered"."

>  > 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.

Also bad for some users.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9bbcef730805280900i1195b5f4rb879d22e9e0319d9>