Date: Tue, 27 Sep 2005 16:31:22 +0400 (MSD) From: Igor Sysoev <is@rambler-co.ru> To: Xin LI <delphij@frontfree.net> Cc: freebsd-performance@freebsd.org, freebsd-arch@freebsd.org Subject: Re: Combine more operation within one system call: to do it, or not to do it? Message-ID: <20050927162014.M65594@is.park.rambler.ru> In-Reply-To: <1127101042.788.30.camel@spirit> References: <1127101042.788.30.camel@spirit>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 19 Sep 2005, Xin LI wrote: > It seems that Microsoft has recently revised several of their APIs. One > example is their ConnectEx(), as found in documentation [1]. The > implementation is not so complex that it just combines more operation > within one system call, however, this can reduce some unnecessary > context switches as it's now possible to do more things within one > system call. (For instance, when you connect to a server, you usually > want to send some data as request). > > Shall we do something similar? Or do we already done something similar? > > [1] > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/connectex_2.asp Actually, ConnectEx() was implemented to allow to post an asynchronous connect operations to the i/o completion ports. There is no API to implement high perfomance proxy in Windows NT and 2000. You have to use non-blocking connect() and then pass the socket to special helper threads that wait in WSAWaitForMultipleEvents() when the sockets would be connected. Each thread could handle up to 63 sockets only. Igor Sysoev http://sysoev.ru/en/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050927162014.M65594>