svn commit: r336063 - head/sys/vm

Sean Bruno sbruno at FreeBSD.org
Sat Jul 7 13:37:45 UTC 2018


Author: sbruno
Date: Sat Jul  7 13:37:44 2018
New Revision: 336063
URL: https://svnweb.freebsd.org/changeset/base/336063

Log:
  Wrap the declaration and assignment of "stripe" with #ifdef NUMA declarations
  as not all targets are NUMA aware.
  
  Found with gcc.
  
  Sponsored by:	Limelight Networks
  Differential Revision:	https://reviews.freebsd.org/D16113

Modified:
  head/sys/vm/uma_core.c

Modified: head/sys/vm/uma_core.c
==============================================================================
--- head/sys/vm/uma_core.c	Sat Jul  7 13:35:06 2018	(r336062)
+++ head/sys/vm/uma_core.c	Sat Jul  7 13:37:44 2018	(r336063)
@@ -2860,7 +2860,9 @@ zone_import(uma_zone_t zone, void **bucket, int max, i
 {
 	uma_slab_t slab;
 	uma_keg_t keg;
+#ifdef NUMA
 	int stripe;
+#endif
 	int i;
 
 	slab = NULL;
@@ -2870,7 +2872,9 @@ zone_import(uma_zone_t zone, void **bucket, int max, i
 		if ((slab = zone->uz_slab(zone, keg, domain, flags)) == NULL)
 			break;
 		keg = slab->us_keg;
+#ifdef NUMA
 		stripe = howmany(max, vm_ndomains);
+#endif
 		while (slab->us_freecount && i < max) { 
 			bucket[i++] = slab_alloc_item(keg, slab);
 			if (keg->uk_free <= keg->uk_reserve)


More information about the svn-src-head mailing list