From owner-svn-src-user@FreeBSD.ORG Tue Mar 12 16:26:07 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 2F36186B; Tue, 12 Mar 2013 16:26:07 +0000 (UTC) (envelope-from alc@rice.edu) Received: from pp1.rice.edu (proofpoint1.mail.rice.edu [128.42.201.100]) by mx1.freebsd.org (Postfix) with ESMTP id E2C6DA7B; Tue, 12 Mar 2013 16:26:06 +0000 (UTC) Received: from pps.filterd (pp1.rice.edu [127.0.0.1]) by pp1.rice.edu (8.14.5/8.14.5) with SMTP id r2C9dG8d006279; Tue, 12 Mar 2013 11:26:04 -0500 Received: from mh11.mail.rice.edu (mh11.mail.rice.edu [128.42.199.30]) by pp1.rice.edu with ESMTP id 1ayt5chj1b-1; Tue, 12 Mar 2013 11:26:04 -0500 X-Virus-Scanned: by amavis-2.7.0 at mh11.mail.rice.edu, auth channel Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh11.mail.rice.edu (Postfix) with ESMTPSA id 49BCB4C01D0; Tue, 12 Mar 2013 11:26:04 -0500 (CDT) Message-ID: <513F571A.5070007@rice.edu> Date: Tue, 12 Mar 2013 11:26:02 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:17.0) Gecko/20130127 Thunderbird/17.0.2 MIME-Version: 1.0 To: attilio@FreeBSD.org Subject: Re: svn commit: r248185 - user/attilio/vmcontention/sys/vm References: <201303120614.r2C6EWve058965@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5400 definitions=5800 signatures=585085 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=57 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1111160001 definitions=main-1101130121 Cc: Alan Cox , src-committers@freebsd.org, svn-src-user@freebsd.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 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: Tue, 12 Mar 2013 16:26:07 -0000 On 03/12/2013 07:04, Attilio Rao wrote: > On Tue, Mar 12, 2013 at 7:14 AM, Alan Cox wrote: >> Author: alc >> Date: Tue Mar 12 06:14:31 2013 >> New Revision: 248185 >> URL: http://svnweb.freebsd.org/changeset/base/248185 >> >> Log: >> When transferring the page from one object to another, don't insert the >> page into its new object until the page's pindex has been updated. >> Otherwise, one code path within vm_radix_insert() may use the wrong >> pindex value. > This is just a style change really because the code already subtracts > offindxstart from current m->pindex when inserting. The pindex on the > page is then adjusted when the real subtraction happens. > IIRC, I did this way because of less diffs against -CURRENT, but the > code looks correct to me already in the older version. > No, as I say in the commit message, there is a path in vm_radix_insert() that uses "page->pindex" and not the "index" argument: /* * A new node is needed because the right insertion level is reached. * Setup the new intermediate node and add the 2 children: the * new object and the older edge. */ tmp2 = vm_radix_node_get(vm_radix_trimkey(page->pindex, clev - 1), 2, clev); Prior to this change, if we follow this path, then we are using the wrong "pindex" value at this point in vm_radix_insert().