From owner-cvs-src@FreeBSD.ORG Fri Dec 16 18:34:20 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B733816A433; Fri, 16 Dec 2005 18:34:20 +0000 (GMT) (envelope-from alc@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8340743D7D; Fri, 16 Dec 2005 18:34:14 +0000 (GMT) (envelope-from alc@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id jBGIYEpd092677; Fri, 16 Dec 2005 18:34:14 GMT (envelope-from alc@repoman.freebsd.org) Received: (from alc@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id jBGIYEnv092676; Fri, 16 Dec 2005 18:34:14 GMT (envelope-from alc) Message-Id: <200512161834.jBGIYEnv092676@repoman.freebsd.org> From: Alan Cox Date: Fri, 16 Dec 2005 18:34:14 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/kern imgact_elf.c src/sys/vm vm_extern.h vm_glue.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Dec 2005 18:34:20 -0000 alc 2005-12-16 18:34:14 UTC FreeBSD src repository Modified files: sys/kern imgact_elf.c sys/vm vm_extern.h vm_glue.c Log: Use sf_buf_alloc() instead of vm_map_find() on exec_map to create the ephemeral mappings that are used as the source for three copy operations from kernel space to user space. There are two reasons for making this change: (1) Under heavy load exec_map can fill up causing vm_map_find() to fail. When it fails, the nascent process is aborted (SIGABRT). Whereas, this reimplementation using sf_buf_alloc() sleeps. (2) Although it is possible to sleep on vm_map_find()'s failure until address space becomes available (see kmem_alloc_wait()), using sf_buf_alloc() is faster. Furthermore, the reimplementation uses a CPU private mapping, avoiding a TLB shootdown on multiprocessors. Problem uncovered by: kris@ Reviewed by: tegge@ MFC after: 3 weeks Revision Changes Path 1.167 +29 -61 src/sys/kern/imgact_elf.c 1.77 +2 -0 src/sys/vm/vm_extern.h 1.214 +72 -0 src/sys/vm/vm_glue.c