From owner-svn-src-head@freebsd.org Sat Nov 18 13:21:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A93A3DBB0B1; Sat, 18 Nov 2017 13:21:23 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7342A6F685; Sat, 18 Nov 2017 13:21:23 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAIDLM80028726; Sat, 18 Nov 2017 13:21:22 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAIDLM6S028725; Sat, 18 Nov 2017 13:21:22 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201711181321.vAIDLM6S028725@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 18 Nov 2017 13:21:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325965 - head/libexec/rtld-elf X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/libexec/rtld-elf X-SVN-Commit-Revision: 325965 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Nov 2017 13:21:23 -0000 Author: trasz Date: Sat Nov 18 13:21:22 2017 New Revision: 325965 URL: https://svnweb.freebsd.org/changeset/base/325965 Log: Increase rtld initial memory pool size from 32kB to 128kB. The old value was probably fine back in 1998, when that code was imported (although the comments still mention VAX, which was quite obsolete by then); now, however, it's too small to handle our libc, which results in some additional calls to munmap/mmap later on. Asking for more virtual address space is virtually free, and syscalls are not, thus the change. It was suggested by kib@ that this might be a symptom of a deeper problem. It doesn't only affect libc, though - the change also improves rtld memory management for eg KDE libraries. I guess it's just a natural bloat. MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D12834 Modified: head/libexec/rtld-elf/malloc.c Modified: head/libexec/rtld-elf/malloc.c ============================================================================== --- head/libexec/rtld-elf/malloc.c Sat Nov 18 11:58:35 2017 (r325964) +++ head/libexec/rtld-elf/malloc.c Sat Nov 18 13:21:22 2017 (r325965) @@ -61,7 +61,7 @@ static int findbucket(); /* * Pre-allocate mmap'ed pages */ -#define NPOOLPAGES (32*1024/pagesz) +#define NPOOLPAGES (128*1024/pagesz) static caddr_t pagepool_start, pagepool_end; static int morepages();