Received: by 10.213.65.68 with SMTP id h4csp2887569imn; Mon, 2 Apr 2018 16:19:47 -0700 (PDT) X-Google-Smtp-Source: AIpwx49Q1Gt3RARm+48qtiXmBRgJI74xT7ywQDpbJzPuvViBmeSaj5kMFfInbP1ZCQvbOQoS3umR X-Received: by 2002:a17:902:8f84:: with SMTP id z4-v6mr11640579plo.210.1522711187584; Mon, 02 Apr 2018 16:19:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522711187; cv=none; d=google.com; s=arc-20160816; b=F2P6ry5b+X1xZ11L9DUVS9WhOq880p78QWKaPte0QzTAMSUuCyt5qxir0i7jlVqryF NaQ4ZWF/fFr9xLmNpN/esT55OARpEoDhkqYdRFsgIzxvL6wKeUF+RVzJqb0mUp/UgkRR hLe7fbs/1TTtMymC1yACeUFUu6ydz7bnp/O9AdhMwl4SYO7yjyGUMepIZGkCixD4JjdK A8aRIs8vHgX/Gzx4nRFyYxIFzllSO+FzWWewpjYrPZVrohIG0bc2dTyfn883CL8/B3D1 EIqg7sy7d9HZGiXAyCBou3J29EWPeUg32UV14KM0N5yrppUDTaQbEYw7Z4XbizYWx3x0 h2ow== 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=wWn++oedSxOuO55xyuVsI3xHvVkHMTuOqb2JV7rcyiw=; b=Ls5aWN2TLwgKYhxAHqJO4p7JyhcqzPVe7TZg0sUiBrzsls9umNa3R5ID+WJ+e1kroz WceiermWzLd6u5SLAXKYh0LdrywWoHlPn9B2+FhEdWi/G9CIajZbbnrM9XD8VI4EdUDq 2mzlzK2m0jgszgSv2EdgsTwWud5bJxuuRB7Srr/0tJ2FrqHaubglSx+2d6FZ4hnBh7Pm rIS35ayZlNi3fluUfSFGFWEtn9OvIvD/P9X+PxJN7q6HFI2NM0UFmG+HICn8q7Ad/3kk aF3JAgdL2kDcJKubBpIPOlzJSeT6RWBHE/JQx78XqXpRzqQ+8QLf0hyguKCas78qCpUy i99A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=W1rP4xhh; 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 v1si915681pgc.137.2018.04.02.16.19.33; Mon, 02 Apr 2018 16:19:47 -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=W1rP4xhh; 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 S1754638AbeDBXSS (ORCPT + 99 others); Mon, 2 Apr 2018 19:18:18 -0400 Received: from mail-pl0-f65.google.com ([209.85.160.65]:42932 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754550AbeDBXSR (ORCPT ); Mon, 2 Apr 2018 19:18:17 -0400 Received: by mail-pl0-f65.google.com with SMTP id g20-v6so6203348plo.9 for ; Mon, 02 Apr 2018 16:18:17 -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=wWn++oedSxOuO55xyuVsI3xHvVkHMTuOqb2JV7rcyiw=; b=W1rP4xhhuybPnQ7/FtCjHT4OU4bP2eLoGxC5rvxi7gRF255PulPeGKY7/YbPB4xUnd 3X45YArjiS8MbvpeyFXxlTXBveINXnrGb3cIPw2VKinpqk61Dwy2KkJ5eQ6hW0ICfouL HvWDjouTjgqPbMuSEY9igMftqgTs4skmE7pqoozJIxFHRbplrdSEBTgt+3zfi9vSBghA p0APijPL7luQOuo9UDbjJNMmfUqHfQgwO6dqWK12SPyGKnfNOyhP/eHQCvhoq/hrjqN5 COTdztz9Oucw4GfsFkpY/eVrItxG4lj1btCRgmXZsKd7NeDT894gTi+rOqlXt1HwDwKt dW/w== 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=wWn++oedSxOuO55xyuVsI3xHvVkHMTuOqb2JV7rcyiw=; b=k2GHTlVWfsHS5VxlF6NhYdpIRmWzneUP6O7T7vs0+tahAe27crGILReWjF8MbWuCxL l4tGREs6+02Ti2KkafY0YWOFNlgyV+ZP2m6xhEicnMPhrRMr8iho+M8bd8EfiFvBiew4 8Rjn+WGwPfnMbz0vzzdvhuWZfnkTxzMRtq3S/SnsE6aWcMqXk+hkRfJTj+szmH90NIqa 0YDgOD9FPhedFXxxT3KCow0icBPcOaYfCdjDP0dka7GwDsK0z4UPtNE6+Gw4jz/HHJ2D Px6oxd2dSgH8iY6lT5dBpmiUFtcc1ibDx6VEHzanCXHfxzk69vqxWse+RO4H3rhV+euC IK6Q== X-Gm-Message-State: AElRT7FENkN2j8iD36SNJ8tF+44goAch9/8ZpgER8YgYtMNysAJPmfUj eJ2Yv+e6Ragz02hiVqyIIjbWNA== X-Received: by 10.98.139.143 with SMTP id e15mr8761566pfl.134.1522711096536; Mon, 02 Apr 2018 16:18:16 -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 189sm2658761pfu.44.2018.04.02.16.18.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Apr 2018 16:18:15 -0700 (PDT) Date: Mon, 2 Apr 2018 16:18:15 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Laurent Dufour cc: 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: <1520963994-28477-16-git-send-email-ldufour@linux.vnet.ibm.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> 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, 13 Mar 2018, Laurent Dufour wrote: > diff --git a/include/linux/mm.h b/include/linux/mm.h > index a84ddc218bbd..73b8b99f482b 100644 > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@ -1263,8 +1263,11 @@ struct zap_details { > pgoff_t last_index; /* Highest page->index to unmap */ > }; > > -struct page *_vm_normal_page(struct vm_area_struct *vma, unsigned long addr, > - pte_t pte, bool with_public_device); > +struct page *__vm_normal_page(struct vm_area_struct *vma, unsigned long addr, > + pte_t pte, bool with_public_device, > + unsigned long vma_flags); > +#define _vm_normal_page(vma, addr, pte, with_public_device) \ > + __vm_normal_page(vma, addr, pte, with_public_device, (vma)->vm_flags) > #define vm_normal_page(vma, addr, pte) _vm_normal_page(vma, addr, pte, false) > > struct page *vm_normal_page_pmd(struct vm_area_struct *vma, unsigned long addr, If _vm_normal_page() is a static inline function does it break somehow? It's nice to avoid the #define's. > diff --git a/mm/memory.c b/mm/memory.c > index af0338fbc34d..184a0d663a76 100644 > --- a/mm/memory.c > +++ b/mm/memory.c > @@ -826,8 +826,9 @@ static void print_bad_pte(struct vm_area_struct *vma, unsigned long addr, > #else > # define HAVE_PTE_SPECIAL 0 > #endif > -struct page *_vm_normal_page(struct vm_area_struct *vma, unsigned long addr, > - pte_t pte, bool with_public_device) > +struct page *__vm_normal_page(struct vm_area_struct *vma, unsigned long addr, > + pte_t pte, bool with_public_device, > + unsigned long vma_flags) > { > unsigned long pfn = pte_pfn(pte); > Would it be possible to update the comment since the function itself is no longer named vm_normal_page?