From owner-freebsd-hackers Fri Oct 26 8:23:25 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from straylight.ringlet.net (sentinel.office1.bg [217.75.129.210]) by hub.freebsd.org (Postfix) with SMTP id 0CF7037B406 for ; Fri, 26 Oct 2001 08:21:49 -0700 (PDT) Received: (qmail 20499 invoked by uid 1000); 26 Oct 2001 15:18:05 -0000 Date: Fri, 26 Oct 2001 18:18:05 +0300 From: Peter Pentchev To: Maxim Sobolev Cc: Ian Dowse , hackers@FreeBSD.org Subject: Re: cvs commit: ports/devel/ORBit Makefile ports/devel/ORBit/files patch-src::IIOP::giop-msg-buffer.c Message-ID: <20011026181805.H33751@straylight.oblivion.bg> Mail-Followup-To: Maxim Sobolev , Ian Dowse , hackers@FreeBSD.org References: <200110261421.aa89321@salmon.maths.tcd.ie> <3BD977E4.DA2F224B@FreeBSD.org> <20011026175819.G33751@straylight.oblivion.bg> <3BD97C13.81DF3E6F@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3BD97C13.81DF3E6F@FreeBSD.org>; from sobomax@FreeBSD.org on Fri, Oct 26, 2001 at 06:06:59PM +0300 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Oct 26, 2001 at 06:06:59PM +0300, Maxim Sobolev wrote: > Peter Pentchev wrote: > > > > On Fri, Oct 26, 2001 at 05:49:08PM +0300, Maxim Sobolev wrote: [snip] > > > > > > On the step 3, when marshalling results of the call, daemon > > > creates a large collection of small buffers (usually 5-10 > > > bytes long each) arranged as array of struct iovec and then > > > sends this whole buffer to the client using writev(2) call. > > > In my particular case there were some 2,800 entries in the > > > buffer and when the daemon tried to send it to the client > > > writev(2) was returning -1 and setting errno to be EINVAL, > > > which confused the server and the client causing RPC to > > > fail. > > > > 2800 entries? Well, from the writev(2) manual page: > > > > In addition, writev() may return one of the following errors: > > > > ... > > > > [EINVAL] Iovcnt was less than or equal to 0, or greater than > > UIO_MAXIOV. > > > > And at least on -stable, UIO_MAXIOV is defined as 1024.. > > Ah, ok. I've overlooked it somehow. So basically, you still want a loop, but it could be a writev(2) loop, not a write(2) loop, to keep some of the writev(2) performance benefit. G'luck, Peter -- If the meanings of 'true' and 'false' were switched, then this sentence wouldn't be false. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message