Re: About I/O callbacks ...

Davide Libenzi (davidel@xmailserver.org)
Fri, 22 Jun 2001 08:55:00 -0700 (PDT)


On 22-Jun-2001 Andi Kleen wrote:
> Davide Libenzi <davidel@xmailserver.org> writes:
>
>> I was just thinking to implement I/O callbacks inside the kernel and test
>> which
>> kind of performance could result compared to a select()/poll()
>> implementation.
>> I prefer IO callbacks against async-io coz in this way is more direct to
>> implement an I/O driven state machine + coroutines.
>> This is a first draft :
>
> They already exist since several years in Linux.
>
> It is called queued SIGIO; when you set a realtime signal
> using F_SETSIG for a fd and enable async IO. The callback is a signal
> handler or alternatively an event processing loop using sigwaitinfo*().
> The necessary information like which fd got an event is passed in the
> siginfo_t.

I know about rt signals and SIGIO :) but I can't see how You can queue signals :

current->sig->action[..]

The action field is an array so if more than one I/O notification is fired
before the SIGIO is delivered, You'll deliver only the last one.
Am I missing something ?

- 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/