svn commit: r237461 - user/attilio/vmcontention/sys/vm
Attilio Rao
attilio at FreeBSD.org
Fri Jun 22 22:45:36 UTC 2012
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;
}
More information about the svn-src-user
mailing list