8199791: (se) More Selector cleanup

David Lloyd david.lloyd at redhat.com
Tue Mar 20 15:25:48 UTC 2018


On Tue, Mar 20, 2018 at 9:53 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> On 20/03/2018 14:44, David Lloyd wrote:
>>
>> Looks good to me (non-reviewer).  I still believe the timeout calcs
>> should use System.nanoTime() instead of currentTimeMillis(), and I'd
>> like to see Linux using eventfd instead of a pipe for selector
>> wakeups... but those are subjects for future discussion/patches,
>> probably.
>
> You're probably right that this should move to nanoTime. On eventfs, what
> advantage do you see for using this over the socketpair?

My understanding is that eventfd has lower overhead in the kernel (no
buffer space allocation for example, and dispatch is faster as a
result of this and other things) and certainly in userspace (using
only one FD instead of two).

-- 
- DML


More information about the nio-dev mailing list