Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Feb 2020 01:06:18 +0000 (UTC)
From:      Jeff Roberson <jeff@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r358010 - head/sys/vm
Message-ID:  <202002170106.01H16IMK064405@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jeff
Date: Mon Feb 17 01:06:18 2020
New Revision: 358010
URL: https://svnweb.freebsd.org/changeset/base/358010

Log:
  UMA has become more particular about zone types.  Use the right allocator
  calls in uma_zwait().

Modified:
  head/sys/vm/uma_core.c

Modified: head/sys/vm/uma_core.c
==============================================================================
--- head/sys/vm/uma_core.c	Sun Feb 16 23:10:59 2020	(r358009)
+++ head/sys/vm/uma_core.c	Mon Feb 17 01:06:18 2020	(r358010)
@@ -2944,10 +2944,13 @@ uma_zdestroy(uma_zone_t zone)
 void
 uma_zwait(uma_zone_t zone)
 {
-	void *item;
 
-	item = uma_zalloc_arg(zone, NULL, M_WAITOK);
-	uma_zfree(zone, item);
+	if ((zone->uz_flags & UMA_ZONE_SMR) != 0)
+		uma_zfree_smr(zone, uma_zalloc_smr(zone, M_WAITOK));
+	else if ((zone->uz_flags & UMA_ZONE_PCPU) != 0)
+		uma_zfree_pcpu(zone, uma_zalloc_pcpu(zone, M_WAITOK));
+	else
+		uma_zfree(zone, uma_zalloc(zone, M_WAITOK));
 }
 
 void *



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202002170106.01H16IMK064405>