Date: Fri, 16 Dec 2005 18:34:14 +0000 (UTC) From: Alan Cox <alc@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern imgact_elf.c src/sys/vm vm_extern.h vm_glue.c Message-ID: <200512161834.jBGIYEnv092676@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200512161834.jBGIYEnv092676>
