From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 23 10:22:14 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 A6F9916A403 for ; Thu, 23 Nov 2006 10:22:14 +0000 (UTC) (envelope-from dudu@dudu.ro) Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2ABAD43D73 for ; Thu, 23 Nov 2006 10:21:36 +0000 (GMT) (envelope-from dudu@dudu.ro) Received: by nz-out-0102.google.com with SMTP id i11so277648nzh for ; Thu, 23 Nov 2006 02:22:10 -0800 (PST) Received: by 10.65.219.4 with SMTP id w4mr14245257qbq.1164277329939; Thu, 23 Nov 2006 02:22:09 -0800 (PST) Received: by 10.65.110.19 with HTTP; Thu, 23 Nov 2006 02:22:09 -0800 (PST) Message-ID: Date: Thu, 23 Nov 2006 12:22:09 +0200 From: "Vlad Galu" To: freebsd-hackers@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: 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 10:22:14 -0000 On 11/23/06, Ivan Voras wrote: > Vlad Galu wrote: > > > It seems to me you would have to propagate that info along the > > VOP_WRITE_POST->VFS_KNOTE_LOCKED->VN_KNOTE->knote() chain. Since > > knote() is generic and is used for all types of notifications, you can > > probably roll down your own replacement and call it from VN_KNOTE. Of > > course, there probably is a better way :) > > Before I get any further with this, can anyone predict what would be the > impact of monitoring a large number of files (50,000 or more) with > kqueue? For kqueue to work, each file would have to be opened (and take > up one file descriptor). My guess is that it won't be remarcably high. However, you can create those files, add them to your notification list and randomly write bytes to them, to see how your system performs. One more suggestion, I think it would be better if, in case you extend the vnode API, you only send the size of the write in the data field of the kevent structure and you store the offset in your program and adding the size to it everytime an event occurs. > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > -- If it's there, and you can see it, it's real. If it's not there, and you can see it, it's virtual. If it's there, and you can't see it, it's transparent. If it's not there, and you can't see it, you erased it.