From owner-cvs-all@FreeBSD.ORG Sun Dec 18 03:22:01 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1C60F16A41F; Sun, 18 Dec 2005 03:22:01 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id F3FD643D4C; Sun, 18 Dec 2005 03:21:59 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id F304552C76; Sun, 18 Dec 2005 04:21:57 +0100 (CET) Received: from localhost (djz42.neoplus.adsl.tpnet.pl [83.24.3.42]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id EB0BA50F93; Sun, 18 Dec 2005 04:21:51 +0100 (CET) Date: Sun, 18 Dec 2005 04:20:53 +0100 From: Pawel Jakub Dawidek To: Alan Cox Message-ID: <20051218032053.GD80713@garage.freebsd.pl> References: <200512161834.jBGIYEnv092676@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NtwzykIc2mflq5ck" Content-Disposition: inline In-Reply-To: <200512161834.jBGIYEnv092676@repoman.freebsd.org> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r535 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=BAYES_00,RCVD_IN_NJABL_DUL, RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern imgact_elf.c src/sys/vm vm_extern.h vm_glue.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2005 03:22:01 -0000 --NtwzykIc2mflq5ck Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 16, 2005 at 06:34:14PM +0000, Alan Cox wrote: +> alc 2005-12-16 18:34:14 UTC +>=20 +> FreeBSD src repository +>=20 +> Modified files: +> sys/kern imgact_elf.c=20 +> sys/vm vm_extern.h vm_glue.c=20 +> 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. I got panic on boot with this change (maybe because I've DEBUG_VFS_LOCKS compiled into the kernel): Trying to mount root from ufs:/dev/ad0s1a KDB: stack backtrace: vfs_badlock() at vfs_badlock+0x95 assert_vop_locked() at assert_vop_locked+0x77 VOP_GETPAGES_APV() at VOP_GETPAGES_APV+0x8a vnode_pager_getpages() at vnode_pager_getpages+0x92 vm_imgact_map_page() at vm_imgact_map_page+0x84 elf64_load_section() at elf64_load_section+0xe9 exec_elf64_imgact() at exec_elf64_imgact+0x336 kern_execve() at kern_execve+0x457 execve() at execve+0x5d start_init() at start_init+0x249 fork_exit() at fork_exit+0xbb fork_trampoline() at fork_trampoline+0xe --- trap 0, rip =3D 0, rsp =3D 0xffffffffb280dd40, rbp =3D 0 --- VOP_GETPAGES: 0xffffff0009848200 is not locked but should be KDB: enter: lock violation [thread pid 1 tid 100004 ] Stopped at kdb_enter+0x2f: nop =20 --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --NtwzykIc2mflq5ck Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDpNWVForvXbEpPzQRAuvAAKCXvfmv2MOpzaWjVMng31QDrMwe1QCgsmCv ME/32kWwR9gRaQFnBe8gtlY= =97nA -----END PGP SIGNATURE----- --NtwzykIc2mflq5ck--