Re: Alan Cox quote? (was: Re: accounting for threads)
Davide Libenzi (davidel@xmailserver.org)
Wed, 20 Jun 2001 09:21:04 -0700 (PDT)
On 20-Jun-2001 Larry McVoy wrote:
> On Tue, Jun 19, 2001 at 10:57:38PM -0400, Michael Rothwell wrote:
>> On 19 Jun 2001 20:01:56 +0100, Alan Cox wrote:
>>
>> > Linux inherits several unix properties which are not friendly to good
>> > state
>> > based programming - lack of good AIO for one.
>>
>> Oh, how I would love for select() and poll() to work on files... or for
>> any other working AIO mothods to be present.
>>
>> What would get broken if things were changed to let select() work for
>> filesystem fds?
>
> I asked Linus for this a long time ago and he pointed out that you couldn't
> make it work over NFS, at least not nicely. It does seem like that could
> be worked around by having a "poll daemon" which knew about all the things
> being waited on and checked them. Or something.
>
> I'd like it too. And I'd like a callback for iocompletion, a way to do
> preread(fd, len).
I'll be more than happy to have IO completion only at socket level.
Something like :
struct iocompletion ioc;
fcntl(sfd, F_SETFL, fcntl(sfd, F_GETFL, 0) | O_NONBLOCK);
ioc.event = IOC_READ;
ioc.callback = data_ready;
ioc.data = session_data;
fcntl(sfd, F_ADDIOC, (long) &ioc);
This would be pretty nice.
- Davide
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/