From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 23 12:34:38 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A186D16A47B; Thu, 23 Nov 2006 12:34:38 +0000 (UTC) (envelope-from ivoras@fer.hr) Received: from lara.cc.fer.hr (lara.cc.fer.hr [161.53.72.113]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5881943EBF; Thu, 23 Nov 2006 12:29:03 +0000 (GMT) (envelope-from ivoras@fer.hr) Received: from [127.0.0.1] (localhost.cc.fer.hr [127.0.0.1]) by lara.cc.fer.hr (8.13.8/8.13.8) with ESMTP id kANCTYUD003041; Thu, 23 Nov 2006 13:29:34 +0100 (CET) (envelope-from ivoras@fer.hr) Message-ID: <4565942E.6030004@fer.hr> Date: Thu, 23 Nov 2006 13:29:34 +0100 From: Ivan Voras User-Agent: Thunderbird 1.5.0.4 (X11/20060625) MIME-Version: 1.0 To: Robert Watson References: <20061123121513.U50054@fledge.watson.org> In-Reply-To: <20061123121513.U50054@fledge.watson.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org Subject: Re: Kqueue write event position? 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: Thu, 23 Nov 2006 12:34:38 -0000 Robert Watson wrote: > My concern with this idea is that kqueues are not really intended to > provide an event stream, rather, notification of a condition. As writes > often come in batches, it's likely that by the time the kevent is > received, several writes will have occurred, but only a single event > notification will be present. Is the application you have in mind able > to benefit from what is effectively "polled" sampling of writes? Does > it benefit in the presence of writes from concurrent writers, where > things like the position and length may depend on which of two or more > writers wrote to the file most or least recently? Yes, this was the next question I wanted to ask. I was counting on receiving just the stream of events you describe - receiving random samples of it would be as useful as only receiving write notifications. Thanks for clarifying this!