From owner-freebsd-java@FreeBSD.ORG Tue Aug 3 09:09:32 2010 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 469D51065675 for ; Tue, 3 Aug 2010 09:09:32 +0000 (UTC) (envelope-from davidxu@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 357E78FC15; Tue, 3 Aug 2010 09:09:32 +0000 (UTC) Received: from apple.my.domain (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o7399Uil061195; Tue, 3 Aug 2010 09:09:31 GMT (envelope-from davidxu@freebsd.org) Message-ID: <4C57DCCA.5070109@freebsd.org> Date: Tue, 03 Aug 2010 17:09:30 +0800 From: David Xu User-Agent: Thunderbird 2.0.0.24 (X11/20100603) MIME-Version: 1.0 To: Greg Lewis References: <4C568F93.1070608@freebsd.org> <20100803064729.GA3964@misty.eyesbeyond.com> In-Reply-To: <20100803064729.GA3964@misty.eyesbeyond.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-java@freebsd.org Subject: Re: java nio channel selectors can use kqueue/kevent X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Aug 2010 09:09:32 -0000 Greg Lewis wrote: > G'day David, > > On Mon, Aug 02, 2010 at 05:27:47PM +0800, David Xu wrote: >> I was suprised the java uses poll() on freebsd for its nio, while >> others are using devpoll() or epoll(). I have spent one week to >> work out a patch, and let it work with kqueue. I have tried to make >> it better, but because the java nio selector are poll() centric >> so something in the patch is not very perfect. > > Thanks so much for doing this! I'll try and get it into the jdk16 port > as soon as possible. Are you willing for this change to also go into the > OpenJDK ports? Or, more particularly, are you willing to contribute it > to the main OpenJDK repo? Unfortunately that will require some paper > work. FYI, I have updated the patch: http://people.freebsd.org/~davidxu/java/jdk16_nio_kqueue2.patch Also, following patch will make kqueue as default provider: http://people.freebsd.org/~davidxu/java/DefaultSelectorProvider.patch I will look OpenJDK to see if I can help. ;-)