Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Feb 2004 15:58:33 -0800
From:      David Schultz <das@FreeBSD.ORG>
To:        "M. Warner Losh" <imp@bsdimp.com>
Cc:        current@FreeBSD.ORG
Subject:   Re: Very long SRCS list with unusually long src/ prefix
Message-ID:  <20040205235833.GA2682@VARK.homeunix.com>
In-Reply-To: <20040205.075406.94840701.imp@bsdimp.com>
References:  <20040205091634.GC13932@FreeBSD.org.ua> <20040206012805.N8113@gamplex.bde.org> <20040205.075406.94840701.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Feb 05, 2004, M. Warner Losh wrote:
> We also thought about just raising the limit in the kernel, but
> quickly discovered that they were small to make exec more efficient.

It should be possible to raise the limit without any performance
impact in the normal exec path.  The solution is to double the
buffer size and retry in the case where exec() presently returns
E2BIG, which only costs more when the argument list is very long.
Even in this case, the cost of recopying the arguments should be
less than the cost of forking an additional process.

I looked into this a long time ago, but I abandoned the idea only
because I wasn't sure that I understood all the possible
ramifications of the ABI change for applications that make
assumptions about ARG_MAX.  Presumably if someone analyzed this
problem carefully, the change could be made before 5.3-RELEASE.



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