From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH 12 of 18] x86/mm: Make page_lock/unlock() in arch/x86/mm.c externally callable Date: Thu, 08 Dec 2011 23:06:45 +0000 Message-ID: References: <20111208223822.GH87836@ocelot.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20111208223822.GH87836@ocelot.phlegethon.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Tim Deegan , Andres Lagar-Cavilla Cc: xen-devel@lists.xensource.com, ian.campbell@citrix.com, andres@gridcentric.ca, JBeulich@suse.com, ian.jackson@citrix.com, adin@gridcentric.ca List-Id: xen-devel@lists.xenproject.org On 08/12/2011 22:38, "Tim Deegan" wrote: > At 02:47 -0500 on 08 Dec (1323312447), Andres Lagar-Cavilla wrote: >> This is necessary for a new consumer of page_lock/unlock to follow in >> the series. >> >> Signed-off-by: Andres Lagar-Cavilla > > Nak, I'm afraid. > > These were OK as local functions but if they're going to be made > generally visible, they need clear comments describing what this > locking protects and what the discipline is for avoiding deadlocks. > > Perhaps Jan or Keir can supply appropriate words. The locking was > introduce in this cset: It's Jan's work originally, but the basic intention of page_lock is to serialise pte updates. To aid with this, a page's type cannot change while its lock is held. No lock nests inside a page lock (not even other page locks) so there is no deadlock risk. > changeset: 17846:09dd5999401b > user: Keir Fraser > date: Thu Jun 12 18:14:00 2008 +0100 > files: xen/arch/x86/domain.c xen/arch/x86/domain_build.c > xen/arch/x86/mm.c > description: > x86: remove use of per-domain lock from page table entry handling > > This change results in a 5% performance improvement for kernel builds > on dual-socket quad-core systems (which is what I used for reference > for both 32- and 64-bit). Along with that, the amount of time reported > as spent in the kernel gets reduced by almost 25% (the fraction of > time spent in the kernel is generally reported significantly higher > under Xen than with a native kernel). > > Signed-off-by: Jan Beulich > Signed-off-by: Keir Fraser > > Tim.