Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754399AbbBTK2b (ORCPT ); Fri, 20 Feb 2015 05:28:31 -0500 Received: from smtp02.citrix.com ([66.165.176.63]:31210 "EHLO SMTP02.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754049AbbBTK2a (ORCPT ); Fri, 20 Feb 2015 05:28:30 -0500 X-IronPort-AV: E=Sophos;i="5.09,614,1418083200"; d="scan'208";a="229715358" Message-ID: <54E70C4B.9070707@citrix.com> Date: Fri, 20 Feb 2015 10:28:27 +0000 From: David Vrabel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.4.0 MIME-Version: 1.0 To: Linus Torvalds , David Vrabel CC: "Xen-devel@lists.xen.org" , Mel Gorman , "linux-kernel@vger.kernel.org" Subject: Re: [Xen-devel] NUMA_BALANCING and Xen PV guest regression in 3.20-rc0 References: <54E5DFED.9050700@citrix.com> In-Reply-To: Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 8bit X-DLP: MIA2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1580 Lines: 35 On 19/02/15 23:09, Linus Torvalds wrote: > On Thu, Feb 19, 2015 at 5:06 AM, David Vrabel wrote: >> >> 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. > > That's some crazy stuff, but whatever. The patch is clearly good. Applied, Thanks. Xen PV guests do not use any hardware virtualization features. In particular they do not use nested paging. A 64-bit PV guest runs in user mode for both kernel and userspace. On kernel to user mode transitions, the hypervisor flips between two sets of page tables (the user mode tables do not contain any kernel mappings, but the kernel mode tables contain both). By setting _PAGE_GLOBAL on the userspace entries, a kernel to user transition can avoid flushing the userspace mappings from the TLB. David -- 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/