From owner-cvs-all Sun Oct 28 9: 7:11 2001 Delivered-To: cvs-all@freebsd.org Received: from smtp2.port.ru (mx2.port.ru [194.67.57.12]) by hub.freebsd.org (Postfix) with ESMTP id 2AE9137B401; Sun, 28 Oct 2001 09:07:01 -0800 (PST) Received: from [193.108.237.232] (helo=notebook.vega.com) by smtp2.port.ru with esmtp (Exim 3.14 #1) id 15xtOb-0002Me-00; Sun, 28 Oct 2001 20:06:50 +0300 To: rwatson@FreeBSD.ORG Cc: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG From: Maxim Sobolev Reply-To: sobomax@FreeBSD.org Subject: Re: cvs commit: ports/devel/ORBit Makefile ports/devel/ORBit/files patch-src::IIOP::giop-msg-buffer.c X-Mailer: Pygmy (v0.5.13) Date: Sun, 28 Oct 2001 19:06:33 EET In-Reply-To: Content-type: text/plain Content-Transfer-Encoding: quoted-printable Message-Id: Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, 28 Oct 2001 09:20:32 -0500 (EST), Robert Watson wrote: > = > On Sun, 28 Oct 2001, Maxim Sobolev wrote: > = > > On Fri, 26 Oct 2001 13:22:44 -0400 (EDT), Robert Watson wrote: > > > = > > > Are you exceeding UIO_MAXIOV entries in the array? Right now, I thin= k > > > it's 35, which for dynamically generated entries, could be too small. > > > That error will result in EINVAL, and is documented in the man page. > > = > > Yes, I've already been clued about this, though it's not a 35, but > > 1,024. :) = > = > Hmm. I have no idea where the number 35 came from. :-) Maybe another > platform -- I notice that Solaris actually sets it to 16: It seems that it's the value of KERN_IOV_MAX from sys/sysctl.h. > /usr/include/limits.h:#define IOV_MAX _XOPEN_IOV_MAX > /usr/include/limits.h:#define _XOPEN_IOV_MAX 16 /* max #iovec/p= rocess with readv()/writev() */ > = > My local Linux box has: > = > ... > linux/uio.h: * UIO_MAXIOV shall be at least 16 1003.1g (5.4.1.1) > ... > #define UIO_MAXIOV 1024 > #if 0 > #define UIO_MAXIOV 16 /* Maximum iovec's in one operation = > 16 matches BSD */ > /* Beg pardon: BSD has 1024 --ANK */ > #endif I doubt that Linux is really enforces this limit, because if it does, then the ORBit would be broken there as well. BTW, could you please do me a favor and run the following program on your Linux box and send me its output? It tests and reports real value of the limit. #include #include #include #include int main() { int fd, i; = static struct iovec iovecs[16385]; if ((fd =3D open("/dev/null", O_WRONLY)) < 0) exit(1); = for (i =3D 1; i < 16386 && writev(fd, iovecs, i) >=3D 0; i++); printf("%d\n", i - 1); close(fd); = exit(0); = } -Maxim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message