From owner-freebsd-current@FreeBSD.ORG Wed Mar 16 23:01:52 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3A4CE16A4CE for ; Wed, 16 Mar 2005 23:01:52 +0000 (GMT) Received: from mail26.sea5.speakeasy.net (mail26.sea5.speakeasy.net [69.17.117.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB9E343D2D for ; Wed, 16 Mar 2005 23:01:51 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: (qmail 17956 invoked from network); 16 Mar 2005 23:01:51 -0000 Received: from gate.funkthat.com (HELO hydrogen.funkthat.com) ([69.17.45.168]) (envelope-sender ) by mail26.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 16 Mar 2005 23:01:51 -0000 Received: from hydrogen.funkthat.com (zwtcfq@localhost.funkthat.com [127.0.0.1])j2GN1pGH004972; Wed, 16 Mar 2005 15:01:51 -0800 (PST) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.10/8.12.10/Submit) id j2GN1oqA004971; Wed, 16 Mar 2005 15:01:50 -0800 (PST) Date: Wed, 16 Mar 2005 15:01:50 -0800 From: John-Mark Gurney To: Doug Ambrisko Message-ID: <20050316230150.GG89312@funkthat.com> Mail-Followup-To: Doug Ambrisko , current@freebsd.org References: <20041022071026.GW22681@funkthat.com> <200410221542.i9MFgFn0058384@ambrisko.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200410221542.i9MFgFn0058384@ambrisko.com> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.2-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html cc: current@freebsd.org Subject: Re: lio_listio fixes and adding kqueue notification patch X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John-Mark Gurney List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Mar 2005 23:01:52 -0000 Doug Ambrisko wrote this message on Fri, Oct 22, 2004 at 08:42 -0700: > BTW this could show my own ignorance since I don't think this exists. > What would be nice is if a signal could be associated with kevents > happening. The idea would be that instead of polling for kevents that > a signal handler could be setup to notify the process when a kevent > just happened. The usage would be to set a tell kqueue to signal a > certain signal if any kevent events occur. This would allow a program > not to be just focused on I/O but allow a bunch of computation to > happen then deal with I/O without polling for it. Not every app. > is just a "bit pusher". I'm looking at this problem now, but I thought I might as well respond to this... There is a problem with that in that you could have a kqueue (possibly the same kq) that has an event when that signal is delivered.. this would then attempt to deliver and end up recursing on the lock... I have fixed this wrt kq in a kq, but I haven't investigated trying to make signals delivery work.. You can look at the FIOASYNC code Alfred commited to use the signal on fd ready a while back, but is if 0'd because of this issue... It would probably be easy enough to create another task that does the signal delivery if you want... so when a kq becomes ready, it init's a task to deliver the signal... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."