Message ID | 20230713120557.218592-1-linmiaohe@huawei.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1778927vqm; Thu, 13 Jul 2023 05:14:26 -0700 (PDT) X-Google-Smtp-Source: APBJJlFMrfQo7ajlcKLz0TmSBbX60StMuxEJPFRCnqU4dT/W8zJAIiI+/hbs0iJudciFY1NpLCiU X-Received: by 2002:a05:6870:fba8:b0:1b4:689b:209f with SMTP id kv40-20020a056870fba800b001b4689b209fmr1883106oab.52.1689250466307; Thu, 13 Jul 2023 05:14:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689250466; cv=none; d=google.com; s=arc-20160816; b=tmqMtcTya8cFBfGbEfPRuMp6n7ct0PfgSVpS/1ReYHd+nKnCRddE5RrNtIDe9IasYp DtUc5xb+QW/1XcfyEVOoqkjiHF5Gomwf3Odq5WitrB+8TKrn5iGYBrTpYKhJX9XLlBGk fd/xD/kxnFC7Pex84Pa4j1jFXZ5hVjyATCBnzZOLh9OMSrtamGKlBsoE5kr0+exDp26T XJok9NvR7keWdh3RbYR5E1CfOdb1pXM/j1CxQBYxj/3QW2fO87fPmbupDAK6W06h+E2L 7QJR3stBfpVES19G4mYRZqDxNMmVhdlPaeAMRKB0FhOWCir+Ew4MPK7HpoTDd9RuV1Ff xcJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=DrRSITCbcVtFINX/UJcI8U2TeBxKXffM8AxRmaKOstk=; fh=Mo/Lcs6WtjcRq1QaiJBjtYwS/87p5PpqCapK5ULE+Ko=; b=NDOLB08ftIfUCRA40G2D8KQ9yUrLOI9tpfKELoC47oUwAfAVCPICOAimyrUQtpdIEC QQjTlSUW910jVMI1SQl7FHcjdpanh4b4kVEeeNFoA0N2V/LjgHqruYNwUp4x3e5jPhs2 GKi9fok4UFyqH5+bkPa14hkGA0KiLVnGMOqMuQx38vy5V5PHzrzlBQg+Yfe3ASsFUBCi ahDgGu2AF7tUM0oyO31ci3EeycjEow/7eOD7AeAk+1YnMFkmv5UkimNt8DipMQlrqhF+ iC4I36ikPmVj+OrBQju0V1dWwm5guf/8FWLnnhfsD0rW1SLUK1Uh2fVUMG5SJh7qS6xu i/bg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x5-20020a17090ab00500b00259bbd55d4asi632708pjq.8.2023.07.13.05.14.13; Thu, 13 Jul 2023 05:14:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234343AbjGMMFu (ORCPT <rfc822;tebrre53rla2o@gmail.com> + 99 others); Thu, 13 Jul 2023 08:05:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233707AbjGMMFs (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 13 Jul 2023 08:05:48 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA3961FDE for <linux-kernel@vger.kernel.org>; Thu, 13 Jul 2023 05:05:47 -0700 (PDT) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4R1tb90g7SzrRh9; Thu, 13 Jul 2023 20:05:09 +0800 (CST) Received: from huawei.com (10.174.151.185) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 13 Jul 2023 20:05:45 +0800 From: Miaohe Lin <linmiaohe@huawei.com> To: <akpm@linux-foundation.org> CC: <linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>, <linmiaohe@huawei.com> Subject: [PATCH] mm/huge_memory: use RMAP_NONE when calling page_add_anon_rmap() Date: Thu, 13 Jul 2023 20:05:57 +0800 Message-ID: <20230713120557.218592-1-linmiaohe@huawei.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.174.151.185] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771307496925847744 X-GMAIL-MSGID: 1771307496925847744 |
Series |
mm/huge_memory: use RMAP_NONE when calling page_add_anon_rmap()
|
|
Commit Message
Miaohe Lin
July 13, 2023, 12:05 p.m. UTC
It's more convenient and readable to use RMAP_NONE instead of false when
calling page_add_anon_rmap(). No functional change intended.
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
mm/huge_memory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Thu, Jul 13, 2023 at 08:05:57PM +0800, Miaohe Lin wrote: > It's more convenient and readable to use RMAP_NONE instead of false when > calling page_add_anon_rmap(). No functional change intended. > > Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
On 7/13/23 17:35, Miaohe Lin wrote: > It's more convenient and readable to use RMAP_NONE instead of false when > calling page_add_anon_rmap(). No functional change intended. It's not only more convenient, page_add_anon_rmap() also expects rmap_t as the last argument. > > Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> > --- > mm/huge_memory.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/huge_memory.c b/mm/huge_memory.c > index 9f3109ed7351..762be2f4244c 100644 > --- a/mm/huge_memory.c > +++ b/mm/huge_memory.c > @@ -2255,7 +2255,7 @@ static void __split_huge_pmd_locked(struct vm_area_struct *vma, pmd_t *pmd, > entry = pte_mksoft_dirty(entry); > if (uffd_wp) > entry = pte_mkuffd_wp(entry); > - page_add_anon_rmap(page + i, vma, addr, false); > + page_add_anon_rmap(page + i, vma, addr, RMAP_NONE); > } > VM_BUG_ON(!pte_none(ptep_get(pte))); > set_pte_at(mm, addr, pte, entry); After this change, no other page_add_anon_rmap() call site has non rmap_t argument. Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
On 13.07.23 14:05, Miaohe Lin wrote: > It's more convenient and readable to use RMAP_NONE instead of false when > calling page_add_anon_rmap(). No functional change intended. > > Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> > --- > mm/huge_memory.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/huge_memory.c b/mm/huge_memory.c > index 9f3109ed7351..762be2f4244c 100644 > --- a/mm/huge_memory.c > +++ b/mm/huge_memory.c > @@ -2255,7 +2255,7 @@ static void __split_huge_pmd_locked(struct vm_area_struct *vma, pmd_t *pmd, > entry = pte_mksoft_dirty(entry); > if (uffd_wp) > entry = pte_mkuffd_wp(entry); > - page_add_anon_rmap(page + i, vma, addr, false); > + page_add_anon_rmap(page + i, vma, addr, RMAP_NONE); > } > VM_BUG_ON(!pte_none(ptep_get(pte))); > set_pte_at(mm, addr, pte, entry); Indeed Reviewed-by: David Hildenbrand <david@redhat.com>
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 9f3109ed7351..762be2f4244c 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2255,7 +2255,7 @@ static void __split_huge_pmd_locked(struct vm_area_struct *vma, pmd_t *pmd, entry = pte_mksoft_dirty(entry); if (uffd_wp) entry = pte_mkuffd_wp(entry); - page_add_anon_rmap(page + i, vma, addr, false); + page_add_anon_rmap(page + i, vma, addr, RMAP_NONE); } VM_BUG_ON(!pte_none(ptep_get(pte))); set_pte_at(mm, addr, pte, entry);