Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Oct 2006 14:21:07 +0800
From:      "Adrian Chadd" <adrian@freebsd.org>
To:        freebsd-performance@freebsd.org
Subject:   kqueue examples?
Message-ID:  <d763ac660610222321j411f6454vf9461e95804f8a59@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi all,

I'm currently fiddling with writing a 'simple' TCP proxy for FreeBSD
which uses kqueue to handle IO. I've been looking for examples of
kqueue code which uses all the cute features of kqueue to "optimise"
things, eg "hinting" at send/recv size, whether EOF has been seen,
setting the buffer low watermark for triggering, that kind of thing.

All I've found thus far (and I hope I'm not to blame for my initial
hackings of kqueue in a few bits of software!) are simple
level-triggered uses which don't seem much better than Linux epoll or
Solaris /dev/poll. Even libevent uses it pretty naively.

Has anyone come across some network software which uses kqueue
"differently" to the above ?


Thanks,


Adrian

-- 
Adrian Chadd - adrian@freebsd.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d763ac660610222321j411f6454vf9461e95804f8a59>