From owner-freebsd-current@FreeBSD.ORG Wed Mar 16 23:48:18 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 ABB1916A4CE for ; Wed, 16 Mar 2005 23:48:18 +0000 (GMT) Received: from mail.ambrisko.com (mail.ambrisko.com [64.174.51.43]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0DB4D43D70 for ; Wed, 16 Mar 2005 23:48:18 +0000 (GMT) (envelope-from ambrisko@ambrisko.com) Received: from server2.ambrisko.com (HELO www.ambrisko.com) (192.168.1.2) by mail.ambrisko.com with ESMTP; 16 Mar 2005 15:48:04 -0800 Received: from ambrisko.com (localhost [127.0.0.1]) by www.ambrisko.com (8.12.11/8.12.9) with ESMTP id j2GNm4XV028864; Wed, 16 Mar 2005 15:48:04 -0800 (PST) (envelope-from ambrisko@ambrisko.com) Received: (from ambrisko@localhost) by ambrisko.com (8.12.11/8.12.11/Submit) id j2GNm4MO028863; Wed, 16 Mar 2005 15:48:04 -0800 (PST) (envelope-from ambrisko) From: Doug Ambrisko Message-Id: <200503162348.j2GNm4MO028863@ambrisko.com> In-Reply-To: <20050316230150.GG89312@funkthat.com> To: John-Mark Gurney Date: Wed, 16 Mar 2005 15:48:04 -0800 (PST) X-Mailer: ELM [version 2.4ME+ PL94b (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII 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 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:48:18 -0000 John-Mark Gurney writes: | 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... Note that it would be nice just to have AIO & kqueue working. Currently it is broken in 5.3+ & 6.X. FWIW I checked in an aio & kqueue test into the regressions. There is an lio version that depends on my lio patch to implement that. I also have a version that I was playing around with that randomly did aio_cancels. | 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... I recall his commit but haven't really looked at it. It would be nice to have. Doug A.