Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Jun 2019 16:23:44 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r348746 - head/sys/vm
Message-ID:  <201906061623.x56GNiKS076621@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Thu Jun  6 16:23:44 2019
New Revision: 348746
URL: https://svnweb.freebsd.org/changeset/base/348746

Log:
  Remove the volatile qualifer from uma_kmem_total.
  
  No functional change intended.
  
  Reviewed by:	alc, dougm, kib
  MFC after:	1 week
  Sponsored by:	The FreeBSD Foundation
  Differential Revision:	https://reviews.freebsd.org/D20514

Modified:
  head/sys/vm/uma_core.c

Modified: head/sys/vm/uma_core.c
==============================================================================
--- head/sys/vm/uma_core.c	Thu Jun  6 16:22:29 2019	(r348745)
+++ head/sys/vm/uma_core.c	Thu Jun  6 16:23:44 2019	(r348746)
@@ -146,7 +146,7 @@ static struct sx uma_drain_lock;
 
 /* kmem soft limit. */
 static unsigned long uma_kmem_limit = LONG_MAX;
-static volatile unsigned long uma_kmem_total;
+static unsigned long uma_kmem_total;
 
 /* Is the VM done starting up? */
 static enum { BOOT_COLD = 0, BOOT_STRAPPED, BOOT_PAGEALLOC, BOOT_BUCKETS,
@@ -3737,14 +3737,14 @@ unsigned long
 uma_size(void)
 {
 
-	return (uma_kmem_total);
+	return (atomic_load_long(&uma_kmem_total));
 }
 
 long
 uma_avail(void)
 {
 
-	return (uma_kmem_limit - uma_kmem_total);
+	return (uma_kmem_limit - uma_size());
 }
 
 void



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