From owner-svn-src-all@freebsd.org Thu Feb 14 23:34:19 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E648214E6701; Thu, 14 Feb 2019 23:34:18 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [198.45.61.253]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 73D536B903; Thu, 14 Feb 2019 23:34:18 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id x1ENYA2E045189 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 14 Feb 2019 15:34:10 -0800 (PST) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id x1ENYA42045188; Thu, 14 Feb 2019 15:34:10 -0800 (PST) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Thu, 14 Feb 2019 15:34:10 -0800 From: Gleb Smirnoff To: Justin Hibbits Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r343030 - in head/sys: cam conf dev/md dev/nvme fs/fuse fs/nfsclient fs/smbfs kern sys ufs/ffs vm Message-ID: <20190214233410.GJ83215@FreeBSD.org> References: <201901150102.x0F12Hlt025856@repo.freebsd.org> <20190213192450.32343d6a@ralga.knownspace> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="LpQ9ahxlCli8rRTG" Content-Disposition: inline In-Reply-To: <20190213192450.32343d6a@ralga.knownspace> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 73D536B903 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.975,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Feb 2019 23:34:19 -0000 --LpQ9ahxlCli8rRTG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Justin, On Wed, Feb 13, 2019 at 07:24:50PM -0600, Justin Hibbits wrote: J> This seems to break 32-bit platforms, or at least 32-bit book-e J> powerpc, which has a limited KVA space (~500MB). It preallocates I've J> seen over 2500 pbufs, at 128kB each, eating up over 300MB KVA, J> leaving very little left for the rest of runtime. J> J> I spent a couple hours earlier today debugging with Mark Johnston, and J> his consensus is that the vnode_pbuf_zone is too big on 32-bit J> platforms. Unfortunately I know very little about this area, so can't J> provide much extra insight, but can readily reproduce the issues I see J> triggered by this change, so am willing to help where I can. Ok, let's roll back to old default on 32-bit platforms and somewhat reduce the default on 64-bits. Can you please confirm that the patch attached works for you? -- Gleb Smirnoff --LpQ9ahxlCli8rRTG Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="nvnpbufs.diff" diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index 3e71ab4436cc..ded9e65e4e4c 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -115,13 +115,23 @@ SYSCTL_PROC(_debug, OID_AUTO, vnode_domainset, CTLTYPE_STRING | CTLFLAG_RW, &vnode_domainset, 0, sysctl_handle_domainset, "A", "Default vnode NUMA policy"); +static int nvnpbufs; +SYSCTL_INT(_vm, OID_AUTO, vnode_pbufs, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, + &nvnpbufs, 0, "number of physical buffers allocated for vnode pager"); + static uma_zone_t vnode_pbuf_zone; static void vnode_pager_init(void *dummy) { - vnode_pbuf_zone = pbuf_zsecond_create("vnpbuf", nswbuf * 8); +#ifdef __LP64__ + nvnpbufs = nswbuf * 2; +#else + nvnpbufs = nswbuf / 2; +#endif + TUNABLE_INT_FETCH("vm.vnode_pbufs", &nvnpbufs); + vnode_pbuf_zone = pbuf_zsecond_create("vnpbuf", nvnpbufs); } SYSINIT(vnode_pager, SI_SUB_CPU, SI_ORDER_ANY, vnode_pager_init, NULL); --LpQ9ahxlCli8rRTG--