From owner-svn-src-user@FreeBSD.ORG Fri Jun 22 22:45:35 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D6F681065670; Fri, 22 Jun 2012 22:45:35 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 867238FC17; Fri, 22 Jun 2012 22:45:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q5MMjZdn004617; Fri, 22 Jun 2012 22:45:35 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5MMjZ05004615; Fri, 22 Jun 2012 22:45:35 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201206222245.q5MMjZ05004615@svn.freebsd.org> From: Attilio Rao Date: Fri, 22 Jun 2012 22:45:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237461 - user/attilio/vmcontention/sys/vm X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2012 22:45:36 -0000 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; }