From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [PATCH 2/2] x86: use pv-ops in {pte, pmd}_{set, clear}_flags() Date: Mon, 24 Mar 2014 11:28:11 +0000 Message-ID: <533016CB.4090807@citrix.com> References: <1395425902-29817-1-git-send-email-david.vrabel@citrix.com> <1395425902-29817-3-git-send-email-david.vrabel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WS33A-000546-GN for xen-devel@lists.xenproject.org; Mon, 24 Mar 2014 11:28:16 +0000 In-Reply-To: <1395425902-29817-3-git-send-email-david.vrabel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: David Vrabel Cc: Steven Noonan , Mel Gorman , Elena Ufimtseva , xen-devel@lists.xenproject.org, Boris Ostrovsky List-Id: xen-devel@lists.xenproject.org On 21/03/14 18:18, David Vrabel wrote: > Instead of using native functions to operate on the PTEs in > pte_set_flags(), pte_clear_flags(), pmd_set_flags(), pmd_clear_flags() > use the PV aware ones. Looking at the history of this changes, these were introduced to avoid PV ops for performance reasons. I believe this can be fixed by making the numa-related PTE modifier functions (pte_mknuma(), pte_mknonnuma()) use pte_modify() which is the correct function to use when adjusting page protection. I really do not understand how you're supposed to distinguish between a PTE for a PROT_NONE page and one with _PAGE_NUMA -- they're identical. i.e., pte_numa() will return true for a PROT_NONE protected page which just seems wrong to me. David