From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id F3EF91A0B81 for ; Tue, 2 Dec 2014 09:44:28 +1100 (AEDT) Message-ID: <1417473849.7182.9.camel@kernel.crashing.org> Subject: Re: [PATCH 03/10] mm: Convert p[te|md]_numa users to p[te|md]_protnone_numa From: Benjamin Herrenschmidt To: Mel Gorman Date: Tue, 02 Dec 2014 09:44:09 +1100 In-Reply-To: <1416578268-19597-4-git-send-email-mgorman@suse.de> References: <1416578268-19597-1-git-send-email-mgorman@suse.de> <1416578268-19597-4-git-send-email-mgorman@suse.de> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Cc: Rik van Riel , Linus Torvalds , Hugh Dickins , Linux Kernel , Linux-MM , Ingo Molnar , Paul Mackerras , Aneesh Kumar , Sasha Levin , Dave Jones , LinuxPPC-dev , Kirill Shutemov List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Fri, 2014-11-21 at 13:57 +0000, Mel Gorman wrote: > void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, > pte_t pte) > { > -#ifdef CONFIG_DEBUG_VM > - WARN_ON(pte_val(*ptep) & _PAGE_PRESENT); > -#endif > + /* > + * When handling numa faults, we already have the pte marked > + * _PAGE_PRESENT, but we can be sure that it is not in hpte. > + * Hence we can use set_pte_at for them. > + */ > + VM_WARN_ON((pte_val(*ptep) & (_PAGE_PRESENT | _PAGE_USER)) == > + (_PAGE_PRESENT | _PAGE_USER)); > + His is that going to fare with set_pte_at() called for kernel pages ? Cheers, Ben. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ig0-f170.google.com (mail-ig0-f170.google.com [209.85.213.170]) by kanga.kvack.org (Postfix) with ESMTP id 1A8006B006E for ; Mon, 1 Dec 2014 18:48:17 -0500 (EST) Received: by mail-ig0-f170.google.com with SMTP id r2so15414908igi.3 for ; Mon, 01 Dec 2014 15:48:16 -0800 (PST) Received: from gate.crashing.org (gate.crashing.org. [63.228.1.57]) by mx.google.com with ESMTPS id cy14si13477200igc.10.2014.12.01.15.48.11 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 01 Dec 2014 15:48:14 -0800 (PST) Message-ID: <1417473849.7182.9.camel@kernel.crashing.org> Subject: Re: [PATCH 03/10] mm: Convert p[te|md]_numa users to p[te|md]_protnone_numa From: Benjamin Herrenschmidt Date: Tue, 02 Dec 2014 09:44:09 +1100 In-Reply-To: <1416578268-19597-4-git-send-email-mgorman@suse.de> References: <1416578268-19597-1-git-send-email-mgorman@suse.de> <1416578268-19597-4-git-send-email-mgorman@suse.de> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Mel Gorman Cc: Linux Kernel , Linux-MM , LinuxPPC-dev , Aneesh Kumar , Hugh Dickins , Dave Jones , Rik van Riel , Ingo Molnar , Kirill Shutemov , Sasha Levin , Paul Mackerras , Linus Torvalds On Fri, 2014-11-21 at 13:57 +0000, Mel Gorman wrote: > void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, > pte_t pte) > { > -#ifdef CONFIG_DEBUG_VM > - WARN_ON(pte_val(*ptep) & _PAGE_PRESENT); > -#endif > + /* > + * When handling numa faults, we already have the pte marked > + * _PAGE_PRESENT, but we can be sure that it is not in hpte. > + * Hence we can use set_pte_at for them. > + */ > + VM_WARN_ON((pte_val(*ptep) & (_PAGE_PRESENT | _PAGE_USER)) == > + (_PAGE_PRESENT | _PAGE_USER)); > + His is that going to fare with set_pte_at() called for kernel pages ? Cheers, Ben. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932849AbaLAXR7 (ORCPT ); Mon, 1 Dec 2014 18:17:59 -0500 Received: from gate.crashing.org ([63.228.1.57]:52861 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932461AbaLAXR6 (ORCPT ); Mon, 1 Dec 2014 18:17:58 -0500 Message-ID: <1417473849.7182.9.camel@kernel.crashing.org> Subject: Re: [PATCH 03/10] mm: Convert p[te|md]_numa users to p[te|md]_protnone_numa From: Benjamin Herrenschmidt To: Mel Gorman Cc: Linux Kernel , Linux-MM , LinuxPPC-dev , Aneesh Kumar , Hugh Dickins , Dave Jones , Rik van Riel , Ingo Molnar , Kirill Shutemov , Sasha Levin , Paul Mackerras , Linus Torvalds Date: Tue, 02 Dec 2014 09:44:09 +1100 In-Reply-To: <1416578268-19597-4-git-send-email-mgorman@suse.de> References: <1416578268-19597-1-git-send-email-mgorman@suse.de> <1416578268-19597-4-git-send-email-mgorman@suse.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.7-0ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2014-11-21 at 13:57 +0000, Mel Gorman wrote: > void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, > pte_t pte) > { > -#ifdef CONFIG_DEBUG_VM > - WARN_ON(pte_val(*ptep) & _PAGE_PRESENT); > -#endif > + /* > + * When handling numa faults, we already have the pte marked > + * _PAGE_PRESENT, but we can be sure that it is not in hpte. > + * Hence we can use set_pte_at for them. > + */ > + VM_WARN_ON((pte_val(*ptep) & (_PAGE_PRESENT | _PAGE_USER)) == > + (_PAGE_PRESENT | _PAGE_USER)); > + His is that going to fare with set_pte_at() called for kernel pages ? Cheers, Ben.