Date: Fri, 8 Jun 2018 03:16:17 +0000 (UTC) From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334824 - head/sys/vm Message-ID: <201806080316.w583GHp7054103@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mjg Date: Fri Jun 8 03:16:16 2018 New Revision: 334824 URL: https://svnweb.freebsd.org/changeset/base/334824 Log: uma: remove M_ZERO support for pcpu zones Nothing in the tree uses it and pcpu zones have a fundamentally different use case than the regular zones - they are not supposed to be allocated and freed all the time. This reduces pollution in the allocation fast path. Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Fri Jun 8 02:03:51 2018 (r334823) +++ head/sys/vm/uma_core.c Fri Jun 8 03:16:16 2018 (r334824) @@ -2256,6 +2256,8 @@ uma_zalloc_arg(uma_zone_t zone, void *udata, int flags } KASSERT(curthread->td_critnest == 0 || SCHEDULER_STOPPED(), ("uma_zalloc_arg: called with spinlock or critical section held")); + if (zone->uz_flags & UMA_ZONE_PCPU) + MPASS((flags & M_ZERO) == 0); #ifdef DEBUG_MEMGUARD if (memguard_cmp_zone(zone)) { @@ -3604,13 +3606,8 @@ uma_large_free(uma_slab_t slab) static void uma_zero_item(void *item, uma_zone_t zone) { - int i; - if (zone->uz_flags & UMA_ZONE_PCPU) { - CPU_FOREACH(i) - bzero(zpcpu_get_cpu(item, i), zone->uz_size); - } else - bzero(item, zone->uz_size); + bzero(item, zone->uz_size); } unsigned long
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806080316.w583GHp7054103>