Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754071AbbBTBFX (ORCPT ); Thu, 19 Feb 2015 20:05:23 -0500 Received: from mta-out1.inet.fi ([62.71.2.227]:48609 "EHLO kirsi1.inet.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753862AbbBTBFV (ORCPT ); Thu, 19 Feb 2015 20:05:21 -0500 Date: Fri, 20 Feb 2015 03:05:06 +0200 From: "Kirill A. Shutemov" To: David Vrabel Cc: Mel Gorman , Linus Torvalds , "linux-kernel@vger.kernel.org" , "Xen-devel@lists.xen.org" Subject: Re: NUMA_BALANCING and Xen PV guest regression in 3.20-rc0 Message-ID: <20150220010506.GA10837@node.dhcp.inet.fi> References: <54E5DFED.9050700@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54E5DFED.9050700@citrix.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1633 Lines: 37 On Thu, Feb 19, 2015 at 01:06:53PM +0000, David Vrabel wrote: > Mel, > > The NUMA_BALANCING series beginning with 5d833062139d (mm: numa: do not > dereference pmd outside of the lock during NUMA hinting fault) and > specifically 8a0516ed8b90 (mm: convert p[te|md]_numa users to > p[te|md]_protnone_numa) breaks Xen 64-bit PV guests. > > Any fault on a present userspace mapping (e.g., a write to a read-only > mapping) is being misinterpreted as a NUMA hinting fault and not handled > correctly. All userspace programs end up continuously faulting. > > This is because the hypervisor sets _PAGE_GLOBAL (== _PAGE_PROTNONE) on > all present userspace page table entries. I'm feeling I miss very basic background on how Xen works, but why does it set _PAGE_GLOBAL on userspace entries? It sounds strange to me. > > Note that the comment in asm/pgtable_types.h that says that > _PAGE_BIT_PROTNONE is only valid on non-present entries. > > /* If _PAGE_BIT_PRESENT is clear, we use these: */ > /* - if the user mapped it with PROT_NONE; pte_present gives true */ > #define _PAGE_BIT_PROTNONE _PAGE_BIT_GLOBAL > > Adjusting pte_protnone() and pmd_protnone() to check for the absence of > _PAGE_PRESENT allows 64-bit Xen PV guests to work correctly again (see > following patch), but I'm not sure if NUMA_BALANCING would correctly > work with this change. -- Kirill A. Shutemov -- 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/