Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Jun 2019 16:34:25 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r349017 - stable/12/sys/vm
Message-ID:  <201906131634.x5DGYPbf002877@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Thu Jun 13 16:34:25 2019
New Revision: 349017
URL: https://svnweb.freebsd.org/changeset/base/349017

Log:
  MFC r348746:
  Remove the volatile qualifer from uma_kmem_total.

Modified:
  stable/12/sys/vm/uma_core.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/vm/uma_core.c
==============================================================================
--- stable/12/sys/vm/uma_core.c	Thu Jun 13 16:33:55 2019	(r349016)
+++ stable/12/sys/vm/uma_core.c	Thu Jun 13 16:34:25 2019	(r349017)
@@ -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,
@@ -3857,14 +3857,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?201906131634.x5DGYPbf002877>