From owner-cvs-src-old@FreeBSD.ORG Sun Jul 25 17:44:23 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D6D81065674 for ; Sun, 25 Jul 2010 17:44:23 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7DC9E8FC1B for ; Sun, 25 Jul 2010 17:44:23 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id o6PHiNU0082218 for ; Sun, 25 Jul 2010 17:44:23 GMT (envelope-from alc@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id o6PHiNQv082217 for cvs-src-old@freebsd.org; Sun, 25 Jul 2010 17:44:23 GMT (envelope-from alc@repoman.freebsd.org) Message-Id: <201007251744.o6PHiNQv082217@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to alc@repoman.freebsd.org using -f From: Alan Cox Date: Sun, 25 Jul 2010 17:43:38 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/compat/freebsd32 freebsd32_misc.c src/sys/kern imgact_shell.c kern_exec.c src/sys/vm vm_init.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 17:44:23 -0000 alc 2010-07-25 17:43:38 UTC FreeBSD src repository Modified files: sys/compat/freebsd32 freebsd32_misc.c sys/kern imgact_shell.c kern_exec.c sys/vm vm_init.c Log: SVN rev 210475 on 2010-07-25 17:43:38Z by alc Change the order in which the file name, arguments, environment, and shell command are stored in exec*()'s demand-paged string buffer. For a "buildworld" on an 8GB amd64 multiprocessor, the new order reduces the number of global TLB shootdowns by 31%. It also eliminates about 330k page faults on the kernel address space. Change exec_shell_imgact() to use "args->begin_argv" consistently as the start of the argument and environment strings. Previously, it would sometimes use "args->buf", which is the start of the overall buffer, but no longer the start of the argument and environment strings. While I'm here, eliminate unnecessary passing of "&length" to copystr(), where we don't actually care about the length of the copied string. Clean up the initialization of the exec map. In particular, use the correct size for an entry, and express that size in the same way that is used when an entry is allocated. The old size was one page too large. (This discrepancy originated in 2004 when I rewrote exec_map_first_page() to use sf_buf_alloc() instead of the exec map for mapping the first page of the executable.) Reviewed by: kib Revision Changes Path 1.109 +6 -5 src/sys/compat/freebsd32/freebsd32_misc.c 1.38 +7 -7 src/sys/kern/imgact_shell.c 1.353 +8 -6 src/sys/kern/kern_exec.c 1.51 +3 -1 src/sys/vm/vm_init.c