From owner-freebsd-hackers@FreeBSD.ORG Wed May 28 16:26:06 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 C0F1F1065670 for ; Wed, 28 May 2008 16:26:06 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.231]) by mx1.freebsd.org (Postfix) with ESMTP id A7C638FC0A for ; Wed, 28 May 2008 16:26:06 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so3603703rvf.43 for ; Wed, 28 May 2008 09:26:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=J14qOlpucJM1rFahvP9Ho6oyZlkZxuLyE0FBD5zk6zM=; b=neTyCrUp1YhxGIB3s4ESeBut1fGamAZewUrfEcOyOojmalEAFx7WUF6ihUHlyIPs5ohS1ltnHBFRtTm2ek8FDfYCnbSw5tuVAQQTM4SZDv7V+GNod28/qqTl3d/ftJt5lH6MzopNuoyUS5zAxUASN3KWPJQ3skgQ2ogfd1lQDek= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=f+iGyFQSv6HBS0RG0e6xT+3vEANRX8lHuiQL7v8TdQz7tYOIRTX8/0uguF5I9LZTGcYjjBbxjZ/op2P+GE2IoGBYr9RQsd6Y+wwriAVftCt9or499boIOsZGsuODXy06bZjGn7bImg7zWkB1uLrHLYcGAjnFVIr7LFqucFBLpG8= Received: by 10.141.175.5 with SMTP id c5mr1350893rvp.54.1211990414987; Wed, 28 May 2008 09:00:14 -0700 (PDT) Received: by 10.140.252.21 with HTTP; Wed, 28 May 2008 09:00:14 -0700 (PDT) Message-ID: <9bbcef730805280900i1195b5f4rb879d22e9e0319d9@mail.gmail.com> Date: Wed, 28 May 2008 18:00:14 +0200 From: "Ivan Voras" Sender: ivoras@gmail.com To: freebsd-hackers@freebsd.org, ivoras@freebsd.org In-Reply-To: <200805281446.m4SEkojn099133@lurza.secnetix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200805281446.m4SEkojn099133@lurza.secnetix.de> X-Google-Sender-Auth: 73992bc9bcef29b9 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 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 16:26:06 -0000 2008/5/28 Oliver Fromme : > 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.