Date: Wed, 16 Mar 2005 15:01:50 -0800 From: John-Mark Gurney <gurney_j@resnet.uoregon.edu> To: Doug Ambrisko <ambrisko@ambrisko.com> Cc: current@freebsd.org Subject: Re: lio_listio fixes and adding kqueue notification patch Message-ID: <20050316230150.GG89312@funkthat.com> In-Reply-To: <200410221542.i9MFgFn0058384@ambrisko.com> References: <20041022071026.GW22681@funkthat.com> <200410221542.i9MFgFn0058384@ambrisko.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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."
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050316230150.GG89312>