Received: by 10.213.65.68 with SMTP id h4csp900465imn; Wed, 4 Apr 2018 09:06:56 -0700 (PDT) X-Google-Smtp-Source: AIpwx48/Bpr+Rn/Vj2RMltAE7h/XA0hGuATjttdty942cKYH+GF4z+aN7wXREJ2izR/vKrjUFqUp X-Received: by 2002:a17:902:8ecb:: with SMTP id x11-v6mr19112049plo.402.1522858016103; Wed, 04 Apr 2018 09:06:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522858016; cv=none; d=google.com; s=arc-20160816; b=V5PrF2XM8uQvp1Mm1GIkTt63PGLaQ/ZqdHK1QPcejIpdQLyhmh7zUJnlY9C4Htb8TF Bwof+OidlKvGGLFm8ezfUWo5wZLKLlfTAkYpfYtW7UJ4tnYqbIc559kjwUscx5M3mxa7 8IwHxxdosIZCjGvZl4lAUV+qsqWEroxC1E68vG5qobxQKrcy744tfO7dPa+PMVk7Vl6S QqEHz+y6FjCVkHsinzMrVPtzypAUV8o0J8v4G4nE9J04uyQ2ZGhGAc1vWchgkBseIHnA SaoFJjw3jXeV46wZMOTcKFjn6blLiUoMfKUTAmvxD64K7/M1h1IoTN9lnkt3FhoVLfJc DtCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date:from :references:cc:to:subject:arc-authentication-results; bh=GLgBEJSNMnk4bIDn1xueVl+xLUKV2RbGyTCxpVp1Jlc=; b=giYPPyPNRXhC/Kax8P6oxLU0dgp/Mh5JyMIup+uQY0ZccNNmufwhR7LGgYS9VqgFD5 H6d/00AmC9Z4R0uVWOwRVFdFa7fYbibAbZG5ifpJCqTFTN5TOcCsICttW+N50RbLVDih iw0Zz2AGC5oEf/5cqDYuHKlYWjc3B8L+zwc/V5YP2SybMGmb4bzdw9wQpVQxivryAmrf qpZMx6a5FCwbrrOj2rrSlFBzdn/03neM4S93ozucpzJa3/0rWQ/K5raJC0XPrgNOXcw1 nObiatgHM1rdqCgzMazRy4iTN7P6brHVauMZxqHOsrGME/0+6ZtMipsY6tfkeHXHFW9S /Msg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e4si3894396pgp.431.2018.04.04.09.06.40; Wed, 04 Apr 2018 09:06:56 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752517AbeDDQEa (ORCPT + 99 others); Wed, 4 Apr 2018 12:04:30 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:57890 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752472AbeDDQE3 (ORCPT ); Wed, 4 Apr 2018 12:04:29 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w34G4NHX052156 for ; Wed, 4 Apr 2018 12:04:29 -0400 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0a-001b2d01.pphosted.com with ESMTP id 2h4yr1y50r-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Wed, 04 Apr 2018 12:04:28 -0400 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 4 Apr 2018 17:04:26 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 4 Apr 2018 17:04:19 +0100 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w34G4InH11862504; Wed, 4 Apr 2018 16:04:18 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A635142045; Wed, 4 Apr 2018 16:56:08 +0100 (BST) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A3CCB4203F; Wed, 4 Apr 2018 16:56:06 +0100 (BST) Received: from [9.145.59.61] (unknown [9.145.59.61]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 4 Apr 2018 16:56:06 +0100 (BST) Subject: Re: [PATCH v9 15/24] mm: Introduce __vm_normal_page() To: David Rientjes 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 References: <1520963994-28477-1-git-send-email-ldufour@linux.vnet.ibm.com> <1520963994-28477-16-git-send-email-ldufour@linux.vnet.ibm.com> From: Laurent Dufour Date: Wed, 4 Apr 2018 18:04:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 18040416-0044-0000-0000-0000054373B0 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18040416-0045-0000-0000-000028838B65 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-04-04_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1804040161 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/04/2018 01:18, David Rientjes wrote: > 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. No problem, I'll create it as a static inline function. > >> 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? Sure.