Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jun 2012 22:45:35 +0000 (UTC)
From:      Attilio Rao <attilio@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r237461 - user/attilio/vmcontention/sys/vm
Message-ID:  <201206222245.q5MMjZ05004615@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: attilio
Date: Fri Jun 22 22:45:34 2012
New Revision: 237461
URL: http://svn.freebsd.org/changeset/base/237461

Log:
  Fix a bug where the start address is not correctly pointing to the
  "next" index, scanning 2 times in a row the same object.
  This was hidden because when cache and resident tries are merged
  together there is a check to skip different objects in all the
  vm_radix_lookupn() usages, in order to fix a race with RED nodes.

Modified:
  user/attilio/vmcontention/sys/vm/vm_radix.c

Modified: user/attilio/vmcontention/sys/vm/vm_radix.c
==============================================================================
--- user/attilio/vmcontention/sys/vm/vm_radix.c	Fri Jun 22 21:46:41 2012	(r237460)
+++ user/attilio/vmcontention/sys/vm/vm_radix.c	Fri Jun 22 22:45:34 2012	(r237461)
@@ -768,9 +768,8 @@ vm_radix_lookupn(struct vm_radix *rtree,
 	    "lookupn: tree %p " KFRMT64(index) " slot %d found child %p",
 			    rtree, KSPLT64L(start), KSPLT64H(start), slot, val);
 			out[outidx] = val;
-			if (++outidx == cnt)
-				goto out;
-			if ((VM_RADIX_MAXVAL - start) == 0) {
+			if (++outidx == cnt ||
+			    (VM_RADIX_MAXVAL - start) == 0) {
 				start++;
 				goto out;
 			}



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