On Thu, Jul 3, 2014 at 2:27 PM, Bartosz Gołaszewski <bartekg...@gmail.com> wrote: > have you read my message from June 10th in this thread? Could you > review the patches I attached back then? Busybox still uses ARG_MAX as > default, which is smaller than sysconf(_SC_ARG_MAX) on every system I > checked. In fact commit 5aeae36 isn't even needed if we switch to > using sysconf() as default.
I am using an uclibc-based toolchain and it has ARG_MAX of 126k. (It's sysconf(_SC_ARG_MAX) is 128k, btw, and I don't need to include linux/limits.h to get it.) The case where ARG_MAX is in use gives a small size advantage (eliminates a function call). I would like to preserve that. With sufficiently large ARG_MAX, further wins from sysconf(_SC_ARG_MAX) being bigger than it are exponentially smaller: you can see 4 times fewer fork+execs, but when each execed process already takes a thousand parameters it's likely execution time is dominated by what that process does with each parameter. I pushed a change which attempts to find a balance. Please take a look at current git. _______________________________________________ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox