Received: by 10.213.65.68 with SMTP id h4csp3953461imn; Tue, 3 Apr 2018 13:46:45 -0700 (PDT) X-Google-Smtp-Source: AIpwx48Ja/RNUBNQEEX/BuMN5v5Xrim6bufmfJL55lzPmBqQjZITDvN3Cy6JmmQrIIj20QwTKH8o X-Received: by 10.101.102.3 with SMTP id w3mr9843235pgv.200.1522788405351; Tue, 03 Apr 2018 13:46:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522788405; cv=none; d=google.com; s=arc-20160816; b=sJUhwtBbgkgkJwEPK2K0AeLwmgrL5/4NJD51X75ZYudhf2rNgXV4OtrSve1macKp2n uznJ4wJsDFSWufi6oCnEwhN4i7JN4f2AQzVfbxctxeO30EunwCBajHNyX0q122SekGfV /XjuZSVaMfTvNcb6m6Wn1B9PUaGJyQa6itm5IysbtFC5Jcc1NWCYXxtTcjrPLp2tLfhD gVeubnw8SvWk8UMr6weTGnaJW6GhbKWaMm2vIhtJ4xB+8fiKRzOeVWkvKwA0cBdMds8q MLJ8EcOmtoUMY57QMgov9g+EYe6LTQenbNFpWvgmsW8a8cOHyYsCDA+etGfASTZasNJ3 0EjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=MI3LlGAXngg4cdxywQq/DUrQlvEx3oEn5G+xxH6ekr4=; b=EblLV9It7spOfJAtDMNPlfyhN58aP8MrQkCqwnuSgHVavhZKYg9k0ZhuLJqP7ms4L3 D4w8+PV9S6lAKGnrApHM7jUt8Xr910WesSFZ8wKGIZ2TFpujL7ZRVOrotr6/0UeXcGQo +bmls6FSX4HyfbPDyYTGQ01XCuvQRJ8yQAXR3IjqiRjeaqpTN3DLLbcx2sq3c5WK0umI ZiPyBr+9Odhvo078tUgcCVupagRbht8B7K7cS5H2RszUWtgYCB4V9JddLTyrw87VjUUu Ted87bqYtaBsk3IOEGgkXRe7E13EQjEYiqqNwMGaFQNR35gSVpYIP2gasVdYRd5+k/1k 60ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=WM4W5eS4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l27si2807660pfi.365.2018.04.03.13.46.30; Tue, 03 Apr 2018 13:46:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=WM4W5eS4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753045AbeDCUpW (ORCPT + 99 others); Tue, 3 Apr 2018 16:45:22 -0400 Received: from mail-pl0-f41.google.com ([209.85.160.41]:35680 "EHLO mail-pl0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752420AbeDCUpU (ORCPT ); Tue, 3 Apr 2018 16:45:20 -0400 Received: by mail-pl0-f41.google.com with SMTP id 61-v6so8646692plb.2 for ; Tue, 03 Apr 2018 13:45:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=MI3LlGAXngg4cdxywQq/DUrQlvEx3oEn5G+xxH6ekr4=; b=WM4W5eS4uXjgn6tGNnlr6/7dr9++0xFtgvSvKCPaZ7N0fAVH5E3nD7hQZ6a/g9eJ5D zOW3myzbrb9IKxVCnkhFR98NBr6RrCcC0F/MPuXLlQsQ1odtwhBUrIr+39Zk8TPhXWjK 3xdur0ZBwSR4FbiysI3jZsqtMHMwe3kOdB425tDiIu7KVsHEKo1OV5SgfvT4osQfwsDf QjOFRyHf2gz7NfiExVIJi6+52vsQN62FHfKj245gMYJIh/R8kiSbANCx+lXKlv9su9iR YfBplX+pncJL5bNiVQpPdfrhAcxoUtle7aFrrkAfb4q/tF25CnzsulIyhgrVgzcmfiRw zV1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=MI3LlGAXngg4cdxywQq/DUrQlvEx3oEn5G+xxH6ekr4=; b=V8OctUgrU9bc23cluKMBaHtNBdMeGiRUHsfn+t3EwGyUjbsENeXFgLDhuSFTx9FHP9 D90ZjXftxCpwX3QRKoBxojFkf+t68NjzKdbav7Tc4gHpPMfDM5kcvPMkc0jIwHZkcOou NF3M5hBkYhGaH/dqGw2AT89GjaFyMY7ojPEjv5hqi2sw/f3mgqI2QuxJfD1l8lGZKpJw trhn1DpS+bdJt7kkcm6hxZ+AO0nZ+iWyBgR1BNiDW92gGPnj714w0/S9O3NnOT4xfHjR YFzsN4N72AbZHeT+R2UXnUPpMfmeCEEZslMebgMLzfLw5TW22sL2NZIXehEptvcxK2NI oK2g== X-Gm-Message-State: AElRT7EKrPJlhS5txD7K8fE8ZUsWhAOlsBKQqWDurtV2Jj5xx4jhlmHv kbYMOocd1EyHcVziINusvmb7WA== X-Received: by 2002:a17:902:ab85:: with SMTP id f5-v6mr15413835plr.380.1522788320057; Tue, 03 Apr 2018 13:45:20 -0700 (PDT) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id d4sm5889834pgv.78.2018.04.03.13.45.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Apr 2018 13:45:19 -0700 (PDT) Date: Tue, 3 Apr 2018 13:45:18 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Jerome Glisse cc: Laurent Dufour , paulmck@linux.vnet.ibm.com, peterz@infradead.org, akpm@linux-foundation.org, kirill@shutemov.name, ak@linux.intel.com, mhocko@kernel.org, dave@stgolabs.net, jack@suse.cz, Matthew Wilcox , benh@kernel.crashing.org, mpe@ellerman.id.au, paulus@samba.org, Thomas Gleixner , Ingo Molnar , hpa@zytor.com, Will Deacon , Sergey Senozhatsky , Andrea Arcangeli , Alexei Starovoitov , kemi.wang@intel.com, sergey.senozhatsky.work@gmail.com, Daniel Jordan , linux-kernel@vger.kernel.org, linux-mm@kvack.org, haren@linux.vnet.ibm.com, khandual@linux.vnet.ibm.com, npiggin@gmail.com, bsingharora@gmail.com, Tim Chen , linuxppc-dev@lists.ozlabs.org, x86@kernel.org Subject: Re: [PATCH v9 15/24] mm: Introduce __vm_normal_page() In-Reply-To: <20180403193927.GD5935@redhat.com> Message-ID: References: <1520963994-28477-1-git-send-email-ldufour@linux.vnet.ibm.com> <1520963994-28477-16-git-send-email-ldufour@linux.vnet.ibm.com> <20180403193927.GD5935@redhat.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 3 Apr 2018, Jerome Glisse wrote: > > When dealing with the speculative fault path we should use the VMA's field > > cached value stored in the vm_fault structure. > > > > Currently vm_normal_page() is using the pointer to the VMA to fetch the > > vm_flags value. This patch provides a new __vm_normal_page() which is > > receiving the vm_flags flags value as parameter. > > > > Note: The speculative path is turned on for architecture providing support > > for special PTE flag. So only the first block of vm_normal_page is used > > during the speculative path. > > Might be a good idea to explicitly have SPECULATIVE Kconfig option depends > on ARCH_PTE_SPECIAL and a comment for !HAVE_PTE_SPECIAL in the function > explaining that speculative page fault should never reach that point. Yeah, I think that's appropriate but in a follow-up patch since this is only propagating vma_flags. It will require that __HAVE_ARCH_PTE_SPECIAL become an actual Kconfig entry, however.