Date: Mon, 2 Apr 2018 05:14:32 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331872 - head/sys/vm Message-ID: <201804020514.w325EW3u014450@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Mon Apr 2 05:14:31 2018 New Revision: 331872 URL: https://svnweb.freebsd.org/changeset/base/331872 Log: In uma_startup_count() handle special case when zone will fit into single slab, but with alignment adjustment it won't. Again, when there is only one item in a slab alignment can be ignored. See previous revision of this file for more info. PR: 227116 Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Mon Apr 2 05:11:59 2018 (r331871) +++ head/sys/vm/uma_core.c Mon Apr 2 05:14:31 2018 (r331872) @@ -1828,9 +1828,11 @@ uma_startup_count(int vm_zones) #endif /* Memory for the rest of startup zones, UMA and VM, ... */ - if (zsize > UMA_SLAB_SIZE) + if (zsize > UMA_SLAB_SPACE) pages += (zones + vm_zones) * howmany(roundup2(zsize, UMA_BOOT_ALIGN), UMA_SLAB_SIZE); + else if (roundup2(zsize, UMA_BOOT_ALIGN) > UMA_SLAB_SPACE) + pages += zones; else pages += howmany(zones, UMA_SLAB_SPACE / roundup2(zsize, UMA_BOOT_ALIGN));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201804020514.w325EW3u014450>