Re: [PATCH] /dev/epoll update ...

Davide Libenzi (davidel@xmailserver.org)
Mon, 24 Sep 2001 13:09:08 -0700 (PDT)


On 24-Sep-2001 Jamie Lokier wrote:
> Eric W. Biederman wrote:
>> > As Davide points out in his reply, /dev/epoll is an exact clone of
>> > the O_SETSIG/O_SETOWN/O_ASYNC realtime signal way of getting readiness
>> > change events, but using a memory-mapped buffer instead of signal delivery
>> > (and obeying an interest mask). Unlike /dev/poll, it only provides
>> > information about *changes* in readiness.
>>
>> Right. But it does one additional thing that the rtsig method doesn't
>> it collapses multiple readiness *changes* into a single readiness change.
>> This allows the kernel to keep a fixed size buffer so you never need
>> to fallback to poll as you need to with the rtsig approach.
>
> That could be added to rtsigs, with the same result: no need to fallback
> to poll.

There's already a patch that implement this.

> You could even keep the memory for the queued signal / event inside the file structure.

By keeping the event structure inside the file* require you to collect
these events ( read memory moves ) at peek time.
With /dev/epoll the event is directly dropped inside the mmaped area.

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