Message ID | 20231103140119.2306578-4-wangkefeng.wang@huawei.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 346EFC001B5 for <linux-mm@archiver.kernel.org>; Fri, 3 Nov 2023 14:03:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6F5B0280020; Fri, 3 Nov 2023 10:03:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 67EF328000F; Fri, 3 Nov 2023 10:03:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 56D05280020; Fri, 3 Nov 2023 10:03:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 4A99128000F for <linux-mm@kvack.org>; Fri, 3 Nov 2023 10:03:54 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 1895CA08D5 for <linux-mm@kvack.org>; Fri, 3 Nov 2023 14:03:54 +0000 (UTC) X-FDA: 81416811588.16.8946090 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf02.hostedemail.com (Postfix) with ESMTP id 589BC80030 for <linux-mm@kvack.org>; Fri, 3 Nov 2023 14:03:48 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf02.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699020230; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vvPUq4pcW2H7sJpunngQLYXQwnMIWBCnxO4qS0TOoUQ=; b=U6qUH20LdpV6Kja50SFTub5ffhl/DTBx/EXk1pR7T0SH0xIc1NxDztyQYMrHGQrUzwEpmQ GjZXNYXGJKFPL1xJLdZt/rGpOu/Y3GgIQAVkwoHU8Uaq5tRdXqXl7mdOWVh2kg36LshIzf dLOepgzUd8Mim57eMs1JWqaxOXkEZdo= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf02.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1699020230; a=rsa-sha256; cv=none; b=5kP2FcwN80JetS6B+8DxqhfMtFgQVclNb7XI+gJNR3gzde60wirV68dpFL1ACA1ClHeGjd Orj5u74MUuU+jq15Ym/nKeRolGyq9fscHtULtc996v3Edhrn2NghaA8t4f3WJXtae+G/vB GR7z24oj0bbOMRNDHbhN7LmJ/V/Jgjg= 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: 8bit Content-Type: text/plain 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-Rspamd-Queue-Id: 589BC80030 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: idzai4zd3bhy5ye6ggi3fg585gdbtqxj X-HE-Tag: 1699020228-872574 X-HE-Meta: U2FsdGVkX1+FJb9O+dpcrPTG9rONS1JIS71/13K2RkI9zCQqF25qF6Q/C/QMMPfV4sKKuKDNADFXaejYwyjTvqtTYPyMltijwO1XUGcDEuAYvZOaowT4SgGxzAmzYtq6EbOoTCBCoHyf76WXfVe5Zd+3yFmY9YcwdwsrWojtJw72l7spAs+/rUgM6SYuq/s7Xd/dYhGF4tI7GXz2xMR2cWXd3G3ZtTmfuiIYrfTk01LH/w38/FNlAAdRbJY+qrOIlEwcICzw1T5kGSHOScNNPYbf1MezMN7WDEuW0rgrvS555u8fkYE3jRDix95xOBsSNkpYMdmh3yS9vM5cA1I4OOk27cWTJTN4QbTh6nXL8GMBdXvXvPT8ErtGgt2lNHclff8V/0MOBdio8S3M/yYjDZ0gctDyoqXa7HAVBrW/KWe1Bxd/qrx02Do0D+C6RtsE9ZwMqW42qJ6+CR2jYBXy+KPuaglF0j/+4v3Ijc1CcOx5jwSfOg+Avzsspf4UNrM25PVELyGYjwW2iO9vi1fArS5AOL/2zLv7xZB/40sxmJJli2k0pkL0CzwPQytH3aN4MyjgTT1mIJXOyBia5qWWfYA8WACOCWJJRHhG9t9TLSnYwXLpQWpOn8htiFxZEtNrqWvPO7Yk1NtCDn+6qRKzWuc/Q7gbiM8X0ZVHzDcCbM56st3a7e9u8sMeLrsqUqlrj/5Hmw/y4EryNzJnP8n8eEZdhjUXLxyffHcPzPEQTFI7hDIAIH6k1gQbqAgK9HLLAYfYuBW6gRN2N1Jcr27ktCyQ9MttzeG/3t5rK+SvEpVG+krapYiJgty+CQBM618dpy7XuOa/UjfL3PxbXyfGPVYMKLHVjTHJ1LCDLXnsLFxX40A1cA2t296BDsE3hQ7lToJGppMFikDyi33GkoZxWPGFQZa6f/iks2rSy6aAZoODtXTs3pc5HVKVzD5ebuZzkNrRtiSJgLPS6g/7nJk nzvh1r5z +p9k1vJsVVbpruR9yrzb3Be9/vgDkz79EgWrct3pLpANHtpa9Ajdl9QRSyvGYXmq9Vdlo11qyj1EUPHXCtzTnTBm8TkRTIlPrUZ3KCB5H6LyVBTSoLupBVg6wSrCbr6ZrzgBa3B/NO11xWT8DDh8tYccnIcZ857DfXW7oiKLt2HsSn8OxOubsSGh7eBNDyPHBCK35 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
mm: convert to use folio mm counter
|
expand
|
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);
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(-)