EPollArrayWrapper.release should be O(N), not O(N^2)

Martin Buchholz martinrb at google.com
Thu Nov 5 15:51:24 PST 2009

I believe this fix is important enough to
do the (trivial and low-risk) backport to openjdk6,
and am offering to do so.


On Wed, Nov 4, 2009 at 13:57, Alan Bateman <Alan.Bateman at sun.com> wrote:
> Martin Buchholz wrote:
>> :
>> OK, I've renamed ExpensiveCancel to LotsOfCancels and regenerated the
>> webrev.
> Looks fine.
>>    I'll also look to replace the list in milestone 6 as the
>>    close/cancel shouldn't be O(N).
>> We were thinking along those lines as well.
>> Perhaps a concurrent data structure could be used here as well?
>> I think Google engineers will help review.
> I haven't seen any contention on the updateList but clearly the change to
> flush pending registrations will change that (that one is embarrassing and
> I'm glad that you/Igor caught this). We just need to replace it with
> something that is directly addressable and supports iteration. The original
> need to preserve ordering can also go away if we are careful to convert the
> pending ops. Also, we can use two registratrions lists/whatever so that
> updateRegistrations can process the pending updates concurrently with any
> threads that are registering channels or changing interest ops.
> -Alan.

More information about the nio-dev mailing list