From owner-svn-src-head@FreeBSD.ORG Tue Nov 13 19:01:53 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6E63B2B0; Tue, 13 Nov 2012 19:01:53 +0000 (UTC) (envelope-from alc@rice.edu) Received: from mh11.mail.rice.edu (mh11.mail.rice.edu [128.42.199.30]) by mx1.freebsd.org (Postfix) with ESMTP id 395388FC18; Tue, 13 Nov 2012 19:01:52 +0000 (UTC) Received: from mh11.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh11.mail.rice.edu (Postfix) with ESMTP id 345824C027E; Tue, 13 Nov 2012 13:01:46 -0600 (CST) Received: from mh11.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh11.mail.rice.edu (Postfix) with ESMTP id 328924C027B; Tue, 13 Nov 2012 13:01:46 -0600 (CST) X-Virus-Scanned: by amavis-2.7.0 at mh11.mail.rice.edu, auth channel Received: from mh11.mail.rice.edu ([127.0.0.1]) by mh11.mail.rice.edu (mh11.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id iyXKjCaXFu_n; Tue, 13 Nov 2012 13:01:46 -0600 (CST) 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 1C29A4C025C; Tue, 13 Nov 2012 13:01:45 -0600 (CST) Message-ID: <50A29918.3000002@rice.edu> Date: Tue, 13 Nov 2012 13:01:44 -0600 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:16.0) Gecko/20121111 Thunderbird/16.0.2 MIME-Version: 1.0 To: Andre Oppermann Subject: Re: svn commit: r242941 - in head/sys: sys vm References: <201211130250.qAD2odEw065268@svn.freebsd.org> <50A1FB96.3050300@freebsd.org> In-Reply-To: <50A1FB96.3050300@freebsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Alan Cox , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 19:01:53 -0000 On 11/13/2012 01:49, Andre Oppermann wrote: > On 13.11.2012 03:50, Alan Cox wrote: >> Author: alc >> Date: Tue Nov 13 02:50:39 2012 >> New Revision: 242941 >> URL: http://svnweb.freebsd.org/changeset/base/242941 >> >> Log: >> Replace the single, global page queues lock with per-queue locks >> on the >> active and inactive paging queues. > > Hear hear! Now if only the cache-poisining splay tree would > go as well... I still have some patches that macrotize it > so it can rather easily be replaced with something else, eg. > an RB tree or such. > Honestly, this particular change is not going to have that much of an effect. For some time, in the machine-independent VM layer, the global page queues lock had only been used as a lock on the active, inactive, and hold page queues. Aside from the page daemon, nothing in the machine-independent VM layer acquired and held that lock for more than the time it takes to enqueue or dequeue a single page. There was no reason to have an actual hold queue, so that queue was recently eliminated. The more consequential changes occurred from June to October when I eliminated the use of the global page queues lock from the various pmap implementations, except for PowerPC, which was done by Nathan. Some functions, notably pmap_remove_pages(), held the global page queues lock for quite some time or were so frequently called, notably pmap_enter(), that they created most of the contention for that lock. Right now, the primary issue that I see with the page queue locking is that the page daemon can hold the lock on the active queue for a long time. This may block concurrent page faults from completing because they must typically add the page to the active queue. As for the inactive queue, Kostik already made changes over the summer that now in combination with this change prevent the page daemon from holding the inactive queue lock for a long period of time. As for the splay tree of pages in the VM object, Attilio has been working on-and-off on a path-compressed trie implementation. (The work is in SVN under /user/attilio.) I think it is more likely than not that this work will be in 10.0 when it ships. Alan