Date: Sun, 18 Dec 2005 04:20:53 +0100 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Alan Cox <alc@FreeBSD.org> 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 Message-ID: <20051218032053.GD80713@garage.freebsd.pl> In-Reply-To: <200512161834.jBGIYEnv092676@repoman.freebsd.org> References: <200512161834.jBGIYEnv092676@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051218032053.GD80713>