Message ID | 20231103140119.2306578-4-wangkefeng.wang@huawei.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp1055667vqu; Fri, 3 Nov 2023 07:04:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHRde6Bhhel2ZJ1jYkghsevCctfvXDg+H/YYkh7ZIzNrZazTD9CSWzd03sUqQ2lgPnJmkIR X-Received: by 2002:a17:90b:4016:b0:27d:47b4:785f with SMTP id ie22-20020a17090b401600b0027d47b4785fmr17160661pjb.18.1699020254026; Fri, 03 Nov 2023 07:04:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699020254; cv=none; d=google.com; s=arc-20160816; b=WV/G7p9zNMjNBi/vNKRz7LZ4SY+ZIymNzau7yyPRA1yG79gx2tguH4TIjqwfRzCjfz AHUU0l/D9RyAmVFq5AI14TQS33R8pBh5K5moyuhg4/NrLBQ4WY93VikxACeq82C4W9xD pCHJph9DdovNU+3y65NdzVu8awFEwfn6l2v2mnADxTDwIgzC6uz7zxILe7lgEIuxublH ZC/EgFqb9vhidgBFQmJZVlMOaoyuWKYLOss7BWFfPEiAup1+VGXG/fHf/ALcH8yizdhu pFJ0WWbBpJU8ByBdr7kT0CkCOIdDW2eHkElDNkU6p7X3vLdH/pta7ngjW0nb/+VmkyZi kjHw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=vvPUq4pcW2H7sJpunngQLYXQwnMIWBCnxO4qS0TOoUQ=; fh=kUj/5waaepfljbNx30rj2BALdV0u/mUCTaFWThlgquQ=; b=KgAsRNNY+CODX6NkgTlkkykGFDN8hj3k5d55IdFLcgfGFHp8y2Ua/sQptZCFahj9PH 79IMxwn40H/B8Nhf3W4cUUcn6ker15mNDPYCcI5ldxIWOhwwk1nSoOrm/QugCeVzT+WX oyfXz5REJsLi7Erhmqyu9C1KL4JjrPRKQ7s0291Bn46ZmztI2KsZ7VGZxEb1jzTBmwe6 jgLQTU4EBs5QJSiTeTKl3H+DK8J9k8wtDk8mznSYuR3ZHSBAmEtjSwn0ZgHtCVWMjmEQ XKm9qtl93vSJi7pY86nLY4NWVZw3A6i9ERKa1qRRcapA+humNXRdy9zEqt/GLuiBXy9f 6FQA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id nv18-20020a17090b1b5200b00280277d721dsi1656938pjb.83.2023.11.03.07.04.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 07:04:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id E659882CB50D; Fri, 3 Nov 2023 07:04:02 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377792AbjKCOD7 (ORCPT <rfc822;lhua1029@gmail.com> + 36 others); Fri, 3 Nov 2023 10:03:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377735AbjKCODt (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 3 Nov 2023 10:03:49 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 528ECD57; Fri, 3 Nov 2023 07:03:46 -0700 (PDT) Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4SMMsm4StwzvQKT; Fri, 3 Nov 2023 22:03:40 +0800 (CST) Received: from localhost.localdomain (10.175.112.125) by dggpemm100001.china.huawei.com (7.185.36.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Fri, 3 Nov 2023 22:03:43 +0800 From: Kefeng Wang <wangkefeng.wang@huawei.com> To: Andrew Morton <akpm@linux-foundation.org> CC: <linux-kernel@vger.kernel.org>, <linux-mm@kvack.org>, Matthew Wilcox <willy@infradead.org>, David Hildenbrand <david@redhat.com>, <linux-s390@vger.kernel.org>, Kefeng Wang <wangkefeng.wang@huawei.com> Subject: [PATCH 03/18] mm: userfaultfd: use mm_counter_folio() Date: Fri, 3 Nov 2023 22:01:04 +0800 Message-ID: <20231103140119.2306578-4-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20231103140119.2306578-1-wangkefeng.wang@huawei.com> References: <20231103140119.2306578-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm100001.china.huawei.com (7.185.36.93) 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 03 Nov 2023 07:04:03 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781551861667415444 X-GMAIL-MSGID: 1781551861667415444 |
Series |
mm: convert to use folio mm counter
|
|
Commit Message
Kefeng Wang
Nov. 3, 2023, 2:01 p.m. UTC
Use mm_counter_folio() to save one compound_head() call.
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
mm/userfaultfd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/userfaultfd.c b/mm/userfaultfd.c index 96d9eae5c7cc..e47aa6c91ef8 100644 --- a/mm/userfaultfd.c +++ b/mm/userfaultfd.c @@ -121,10 +121,10 @@ int mfill_atomic_install_pte(pmd_t *dst_pmd, } /* - * Must happen after rmap, as mm_counter() checks mapping (via + * Must happen after rmap, as mm_counter_folio() checks mapping (via * PageAnon()), which is set by __page_set_anon_rmap(). */ - inc_mm_counter(dst_mm, mm_counter(page)); + inc_mm_counter(dst_mm, mm_counter_folio(folio)); set_pte_at(dst_mm, dst_addr, dst_pte, _dst_pte);