Date: Mon, 22 Dec 2008 02:56:27 -0800 From: Maxim Sobolev <sobomax@FreeBSD.org> To: Norikatsu Shigemura <nork@FreeBSD.org> Cc: freebsd-current@FreeBSD.org, Ed Schouten <ed@FreeBSD.org> Subject: Re: Change select(2) to kevent(2) on script(1)... Message-ID: <494F725B.7000103@FreeBSD.org> In-Reply-To: <20081221012752.cdc5cbfc.nork@FreeBSD.org> References: <20081221012752.cdc5cbfc.nork@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Norikatsu Shigemura wrote: > Hi Ed! > > I inspired by your 'kqueue()-support to pseudo-terminal master > devices' (svn commit: r185942). So I'm trying to use kevent(2) > on script(1). (SEE ALSO following patch) It's unrelated question, but I wonder what the reason to do this might be? AFAIK kqueue(2) provides performance benefit only for the cases when one needs to monitor large number of file descriptors. In this case there are just 2 descriptors. The kqueue(2) has big disadvantage of being non-POSIX, FreeBSD-specific interface, making it harder for somebody to adapt the code in non-FreeBSD environment. For this reason IMHO it should only be used for really performance critical code. For other cases select(2)/poll(2) should be the interface of choice. -Maxim
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?494F725B.7000103>