2005-10-05 21:38:45

by Junio C Hamano

[permalink] [raw]
Subject: Re: clone: I'm only doing a max of 256 requests

Junio C Hamano <[email protected]> writes:

> 1. As a stop gap measure, so that your Linux kernel work can
> continue, please bump MAX_NEEDS definition in upload-pack.c
> from 256 to a bit higher. That controls the number of
> 40-letter SHA1 given to underlying rev-list via execvp(), so
> it cannot be _too_ big like 1M, lest it exceeds the exec
> argument buffer limit.

Hmph. I was reading linux-2.6/fs/exec.c::copy_strings(), but I
do not see any such size limit (other than exceeding the total
machine memory size, probably reported by alloc_page() failing)
imposed there. Am I looking at the wrong place?


2005-10-05 22:27:33

by Vincent Hanquez

[permalink] [raw]
Subject: Re: clone: I'm only doing a max of 256 requests

On Wed, Oct 05, 2005 at 02:38:42PM -0700, Junio C Hamano wrote:
> Hmph. I was reading linux-2.6/fs/exec.c::copy_strings(), but I
> do not see any such size limit (other than exceeding the total
> machine memory size, probably reported by alloc_page() failing)
> imposed there. Am I looking at the wrong place?

well at least the len of argv is limited by ~32K (i386) by:

bprm->p = PAGE_SIZE*MAX_ARG_PAGES-sizeof(void *);
...
bprm->argc = count(argv, bprm->p / sizeof(void *));

--
Vincent Hanquez

2005-10-05 22:48:38

by Linus Torvalds

[permalink] [raw]
Subject: Re: clone: I'm only doing a max of 256 requests



On Wed, 5 Oct 2005, Junio C Hamano wrote:
>
> Hmph. I was reading linux-2.6/fs/exec.c::copy_strings(), but I
> do not see any such size limit (other than exceeding the total
> machine memory size, probably reported by alloc_page() failing)
> imposed there. Am I looking at the wrong place?

Look for "MAX_ARG_PAGES".

Ie the limit is about 128kB by default (32 pages). Note that that includes
not just arguments, but environment.

Linus