From owner-freebsd-hackers@FreeBSD.ORG Wed May 28 14:46:52 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F088C1065677; Wed, 28 May 2008 14:46:52 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (unknown [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id 610718FC0A; Wed, 28 May 2008 14:46:52 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.1/8.14.1) with ESMTP id m4SEkotO099134; Wed, 28 May 2008 16:46:50 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.1/8.14.1/Submit) id m4SEkojn099133; Wed, 28 May 2008 16:46:50 +0200 (CEST) (envelope-from olli) Date: Wed, 28 May 2008 16:46:50 +0200 (CEST) Message-Id: <200805281446.m4SEkojn099133@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG, ivoras@FreeBSD.ORG In-Reply-To: X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.2-STABLE-20070808 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Wed, 28 May 2008 16:46:51 +0200 (CEST) Cc: Subject: Re: Impact of having a large number of open file descriptors X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-hackers@FreeBSD.ORG, ivoras@FreeBSD.ORG List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 May 2008 14:46:53 -0000 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