From owner-freebsd-java@FreeBSD.ORG Tue Aug 3 07:26:58 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 F224B106567C; Tue, 3 Aug 2010 07:26:58 +0000 (UTC) (envelope-from glewis@eyesbeyond.com) Received: from misty.eyesbeyond.com (gerbercreations.com [71.39.140.16]) by mx1.freebsd.org (Postfix) with ESMTP id B04D58FC16; Tue, 3 Aug 2010 07:26:58 +0000 (UTC) Received: from misty.eyesbeyond.com (localhost.eyesbeyond.com [127.0.0.1]) by misty.eyesbeyond.com (8.14.4/8.14.4) with ESMTP id o736lTQJ004256; Mon, 2 Aug 2010 23:47:30 -0700 (PDT) (envelope-from glewis@eyesbeyond.com) Received: (from glewis@localhost) by misty.eyesbeyond.com (8.14.4/8.14.4/Submit) id o736lTgR004255; Mon, 2 Aug 2010 23:47:29 -0700 (PDT) (envelope-from glewis@eyesbeyond.com) X-Authentication-Warning: misty.eyesbeyond.com: glewis set sender to glewis@eyesbeyond.com using -f Date: Mon, 2 Aug 2010 23:47:29 -0700 From: Greg Lewis To: David Xu Message-ID: <20100803064729.GA3964@misty.eyesbeyond.com> References: <4C568F93.1070608@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C568F93.1070608@freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) 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 07:26:59 -0000 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. > Here is the patch: > http://people.freebsd.org/~davidxu/patch/jdk16_nio_kqueue.patch > > just cd into /usr/ports/jdk16, and type following commands: > > make extract > make patch > cd work > patch < this_patch_file > cd .. > make install > > note that the patch does not make kqueue method as default provider, > you should specify it on comand line like following: > > java > -Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.KqueueSelectorProvider > > > > Regards, > David Xu > > _______________________________________________ > freebsd-java@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-java > To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" -- Greg Lewis Email : glewis@eyesbeyond.com Eyes Beyond Web : http://www.eyesbeyond.com Information Technology FreeBSD : glewis@FreeBSD.org