Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Jul 2016 01:01:50 +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: r303059 - head/sys/vm
Message-ID:  <201607200101.u6K11ohI054723@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Wed Jul 20 01:01:50 2016
New Revision: 303059
URL: https://svnweb.freebsd.org/changeset/base/303059

Log:
  Release the second critical section in uma_zfree_arg() slightly earlier.
  
  It is only needed when removing a full bucket from the per-CPU cache. The
  bucket cache (uz_buckets) is protected by the zone mutex and thus the
  critical section can be released before inserting into that list.
  
  MFC after:	1 week

Modified:
  head/sys/vm/uma_core.c

Modified: head/sys/vm/uma_core.c
==============================================================================
--- head/sys/vm/uma_core.c	Wed Jul 20 00:53:21 2016	(r303058)
+++ head/sys/vm/uma_core.c	Wed Jul 20 01:01:50 2016	(r303059)
@@ -2744,6 +2744,8 @@ zfree_start:
 		goto zfree_start;
 	}
 	cache->uc_freebucket = NULL;
+	/* We are no longer associated with this CPU. */
+	critical_exit();
 
 	/* Can we throw this on the zone full list? */
 	if (bucket != NULL) {
@@ -2756,9 +2758,6 @@ zfree_start:
 		LIST_INSERT_HEAD(&zone->uz_buckets, bucket, ub_link);
 	}
 
-	/* We are no longer associated with this CPU. */
-	critical_exit();
-
 	/*
 	 * We bump the uz count when the cache size is insufficient to
 	 * handle the working set.



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