From: Andrea Arcangeli Subject: Re: [PATCH] fix pgd_lock deadlock Date: Mon, 21 Feb 2011 15:30:23 +0100 Message-ID: <20110221143023.GF13092@random.random> References: <4D4B1392.5090603@goop.org> <20110204012109.GP5843@random.random> <4D4C6F45.6010204@goop.org> <20110207232045.GJ3347@random.random> <20110215190710.GL5935@random.random> <20110215195450.GO5935@random.random> <20110216183304.GD5935@random.random> <20110217101941.GH2380@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20110217101941.GH2380@redhat.com> Sender: linux-kernel-owner@vger.kernel.org To: Johannes Weiner Cc: Thomas Gleixner , Jeremy Fitzhardinge , "H. Peter Anvin" , the arch/x86 maintainers , "Xen-devel@lists.xensource.com" , Linux Kernel Mailing List , Ian Campbell , Jan Beulich , Larry Woodman , Andrew Morton , Andi Kleen , Hugh Dickins , Rik van Riel List-Id: xen-devel@lists.xenproject.org On Thu, Feb 17, 2011 at 11:19:41AM +0100, Johannes Weiner wrote: > So Xen needs all page tables protected when pinning/unpinning and > extended page_table_lock to cover kernel range, which it does nowhere > else AFAICS. But the places it extended are also taking the pgd_lock, > so I wonder if Xen could just take the pgd_lock itself in these paths > and we could revert page_table_lock back to cover user va only? > Jeremy, could this work? Untested. If this works for Xen, I definitely prefer this. Still there's no point to insist on _irqsave if nothing takes the pgd_lock from irq, so my patch probably should be applied anyway or it's confusing and there's even a comment saying pgd_dtor is called from irq, if it's not it should be corrected. But then it becomes a cleanup notafix.