mldonkey kqueue patch (replace select/poll)

Mario Sergio Fujikawa Ferreira lioux at FreeBSD.org
Wed Aug 10 03:26:11 GMT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

	My previous email did not have enough information.

	MLDonkey is a OCAML/GTK client for a number of peer-to-peer
networks including edonkey, overnet and kademlia. It can be found
on the FreeBSD ports tree under both net/mldonkey and
net/mldonkey-devel.

	I just wrote a patch against ports/net/mldonkey-devel version
2.6.1 to support kqueue(2) FreeBSD kernel event notification mechanism.
It is meant to replace select/poll inside mldonkey.

	kqueue scales better than select/poll not to mention that it
should be faster.

	I am having a little bit of trouble with this patch. MLDonkey
daemon loads and I am able to connect to the daemon through both the
web interface and kmldonkey. However, it seems unable to connect to
eDonkey servers.

	Are there any takers to help me on this one? It should really
improve performance under FreeBSD and possibly other *BSD platforms.

	A sample port with the current patch included can be found at

http://people.FreeBSD.org/~lioux/mldonkey-kqueue.tgz

It is not meant for general use since MLDonkey will not connect to any
servers but it is good enough for someone to have an idea of what I
want to do.

	If you only want the patch, it can be found at

http://people.FreeBSD.org/~lioux/mldonkey-kqueue-patch.zip

	My current hypotheses are:

1) The MLDonkey C stubs used to interface the kqueue code with the
ocaml code are not behaving as expected; i.e., MLDonkey is not calling
the stubs C at each and every needed place (at every addition, removal
and updating of file descriptors which will, in turn, result in similar
changes to the kqueue filters).

2) The kqueue code is not correctly written.

	I think that most people can help with option (2). :) All and
any help is appreciated.

	This discussion can be followed at MLDonkey's patch manager at:

http://savannah.nongnu.org/patch/index.php?func=detailitem&item_id=4293

	Regards,
		MSFF

ps: Please, include me on CC: replies since I am no longer subscribed
to this mailing list.
keywords: select, poll, kqueue, kevent, FreeBSD, NetBSD, OpenBSD, epoll
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

iD8DBQFC+XMDrxEiaFLzGQwRAqLOAJ91g28fIz95wpmPnd2xp/VcEBlC2ACaArlN
f1kspvvVMum/7zYRoNrkIlI=
=6BDw
-----END PGP SIGNATURE-----




More information about the freebsd-stable mailing list