[Xorp-cvs] XORP cvs commit: xorp/libxorp
Bruce M Simpson
bms at incunabulum.net
Mon Nov 3 01:47:23 PST 2008
Pavlin Radoslavov wrote:
> However, inside SelectorList::Node::add_okay() Step 2, the original
> code selected the first _empty_ bin to store the information which
> seems inconsistent with the above-mentioned assumption.
>
This issue was exposed in my testing for bug 799 on Friday, as you
probably saw. The code was using an invalid SEL_XX_IDX of -1 in some
situations.
>
> After the fix, READ I/O registration goes into [SEL_RD_IDX],
> WRITE I/O registration goes into [SEL_WR_IDX], and so on.
> The rest of the Selector code is not modified: it still looks
> for various masks in all array bins which is sub-optimal.
>
> A side note: internally, we don't need the concept of
> SelectorMask, because outside of the EventLoop we can
> register only for a particular event type: IOT_READ, IOT_WRITE, etc.
> The only exception is IOT_ANY, and that one is used only
> when remove_ioevent_cb() is called to remove all callbacks for
> a file descriptor.
> If SelectorMask is removed, this will simplify the implementation,
> and will speed-up the eventloop processing.
>
Yes, that can probably go... One of the goals for Windows refactoring
was to avoid modifying the UNIX code path if at all possible.
thanks
BMS
More information about the Xorp-cvs
mailing list