Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754769Ab1BVROB (ORCPT ); Tue, 22 Feb 2011 12:14:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:23196 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754756Ab1BVRN7 (ORCPT ); Tue, 22 Feb 2011 12:13:59 -0500 Date: Tue, 22 Feb 2011 18:13:41 +0100 From: Andrea Arcangeli To: Jeremy Fitzhardinge Cc: Jan Beulich , Ian Campbell , Andi Kleen , Hugh Dickins , the arch/x86 maintainers , Thomas Gleixner , Andrew Morton , "Xen-devel@lists.xensource.com" , Konrad Rzeszutek Wilk , Johannes Weiner , Larry Woodman , Rik van Riel , Linux Kernel Mailing List , "H. Peter Anvin" Subject: Re: [PATCH] fix pgd_lock deadlock Message-ID: <20110222171341.GD31195@random.random> References: <20110216183304.GD5935@random.random> <20110217101941.GH2380@redhat.com> <20110221143023.GF13092@random.random> <20110221145350.GH25382@redhat.com> <4D6378760200007800033104@vpn.id2.novell.com> <20110222134956.GU13092@random.random> <4D63D4CD020000780003320A@vpn.id2.novell.com> <20110222143421.GX13092@random.random> <4D63EDA6.2070302@goop.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D63EDA6.2070302@goop.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1363 Lines: 27 On Tue, Feb 22, 2011 at 09:08:54AM -0800, Jeremy Fitzhardinge wrote: > On 02/22/2011 06:34 AM, Andrea Arcangeli wrote: > > On Tue, Feb 22, 2011 at 02:22:53PM +0000, Jan Beulich wrote: > >> If everyone's okay with putting a couple of "if (xen_pv_domain())" > >> into mm/fault.c - sure. I would have thought that this wouldn't be > >> liked, hence the suggestion to make this depend on seeing the > >> backlink be non-NULL. > > I prefer the if (xen_pv_domain) so it also gets optimized away > > at build time when CONFIG_XEN=n. I think it's also more self > > explanatory to read. > > Eh, very not keen about that. I'd only consider it as a last resort. > > In practice CONFIG_XEN is always enabled in distros, so the conditional > would always be done at runtime. That's ok, it's still better than setting a page filed IMHO. As the page flag would be set conditional to xen_pv_domain() anyway. I wouldn't like to make things more complicated than they already are, this will make it more explicit why that spinlock is needed too. Unless we foresee other hypervisors using a generic functionality we don't need one. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/