svn commit: r357884 - head/sys/kern

Jeff Roberson jeff at FreeBSD.org
Thu Feb 13 21:10:18 UTC 2020


Author: jeff
Date: Thu Feb 13 21:10:17 2020
New Revision: 357884
URL: https://svnweb.freebsd.org/changeset/base/357884

Log:
  Since r357804 pcpu zones are required to use zalloc_pcpu().  Prior to this
  it was only required if you were zeroing.  Switch to these interfaces.
  
  Reviewed by:	mjg

Modified:
  head/sys/kern/subr_smr.c

Modified: head/sys/kern/subr_smr.c
==============================================================================
--- head/sys/kern/subr_smr.c	Thu Feb 13 20:58:51 2020	(r357883)
+++ head/sys/kern/subr_smr.c	Thu Feb 13 21:10:17 2020	(r357884)
@@ -414,7 +414,7 @@ smr_create(const char *name)
 	int i;
 
 	s = uma_zalloc(smr_shared_zone, M_WAITOK);
-	smr = uma_zalloc(smr_zone, M_WAITOK);
+	smr = uma_zalloc_pcpu(smr_zone, M_WAITOK);
 
 	s->s_name = name;
 	s->s_rd_seq = s->s_wr_seq = SMR_SEQ_INIT;
@@ -436,7 +436,7 @@ smr_destroy(smr_t smr)
 
 	smr_synchronize(smr);
 	uma_zfree(smr_shared_zone, smr->c_shared);
-	uma_zfree(smr_zone, smr);
+	uma_zfree_pcpu(smr_zone, smr);
 }
 
 /*


More information about the svn-src-all mailing list