Message ID | 20231103140119.2306578-12-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 4D6ECC4332F for <linux-mm@archiver.kernel.org>; Fri, 3 Nov 2023 14:04:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E96B7280021; Fri, 3 Nov 2023 10:04:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DF80B28001D; Fri, 3 Nov 2023 10:04:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C9A2C280021; Fri, 3 Nov 2023 10:04:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id B88A628001D for <linux-mm@kvack.org>; Fri, 3 Nov 2023 10:04:19 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 8F66D14093E for <linux-mm@kvack.org>; Fri, 3 Nov 2023 14:04:19 +0000 (UTC) X-FDA: 81416812638.26.81AD917 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by imf01.hostedemail.com (Postfix) with ESMTP id 4B1BA4002A for <linux-mm@kvack.org>; Fri, 3 Nov 2023 14:04:16 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf01.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.255 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=1699020257; 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=J/rSriB3aflAPXuP/oLdhUT4o9qoZ0PrxLn1lca2smA=; b=U5YKXz9CH2aFJlnOs7NFc4K5qgIxsAXU5blM8AX5Mr3o+LKO24lwqsRIB1j6wWaQEQOa13 g9RK614SefiBRLfTfVKG6phNSqoIb70JIk10KKR7xwwrPy8Yo/egm+oVsUt5VFiCIZb216 67wpQhqGJWzXm8B2Y0F+pW1aubZfOKQ= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf01.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1699020257; a=rsa-sha256; cv=none; b=cjAWIjil+y2lintqLOBKYfqYlRGiJbVLvoLxF+0h7fK69dQxrdfHi9/IWuzeMS21z0CmsM j32RIv5ATTPFuEoCc9PH0cDWzclVM4q3LBe6p64FBdWnNq+XcBWnggEsXxSO0NtdV6Ko8s 3Jc+30Knstzt0eLLjEQ7Tam1UV0ymP4= Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.54]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4SMMpQ0R1Xz1P7pS; Fri, 3 Nov 2023 22:00:46 +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:47 +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 11/18] mm: memory: use mm_counter_file_folio() in wp_page_copy() Date: Fri, 3 Nov 2023 22:01:12 +0800 Message-ID: <20231103140119.2306578-12-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-Rspam-User: X-Stat-Signature: 5sdgdsqu9occuzw57umenedhhnea6p9t X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 4B1BA4002A X-HE-Tag: 1699020256-206388 X-HE-Meta: U2FsdGVkX18QAN6qRGgKafmCs4Nmz4lpJxewhTahHYn8qnXBJaZCufLgdPCDI99EHdcH534zVRfIGfGNQDbbr7PfojLGZoyqeSOgc+1MJ1mtEWFnjQrD9+fc8AU+2R4MHqqoEalszrO4j5xYHybP4X1u/vsH4EG7+mVbeHNgXXyw2BHkG3rLZr8wpxww3Fk7EF1vIXQ7ehS/J1x5KhTMQ4Yojqy/XGvonsHlIvbvuHJV6iR/cfM/E6GQ7/C0TdtQERPmEVCffesiNMygrZJjo/5IFeCrYopfnJ7dphgjTSpmJb2dCakyvvskz7rEhcrQeTapVIH6UMOvGlj8E3tPNNaq3WbwwsTA/jhKiChZiQsutgvc7ttrZCbrpFg+fcIJotacC0SgRYQGo/gjae092l9VEbHsDUoF7tyHwtgCJPP7PCQllM2AUim2mHiHL7JIhjK3DdgqavtpQv8xw560YsY67HwU6YrPn0Mnc8Z86xxEavng5N6nSfVrPil/s0wYNDpdumBqkCdPp4FtfScrFb21ZXD/LZwfvj/9tuEDWhpgqaOC6boiAGiamSvJibFcZBpyLuT97BuU5oyS3o9QzvrLuOolE6uIuR1I0zZWTJeQtjrVCtig5GNtWJurNPtQnEcVCyGANJlJHCo54YHD97RumD7WJbqUMiV9RsJ+/QByTECWfsL2ax9mrfMuTavwn6Vb4c7vZ05AvinwNZJKbiOjLpsLe5nKG7aneDLkRe+SZbQ7FoUGmWp2hWktRtSKFvfMASATs4SiCWm1GnSQ/vT570qO0xWDZuu1EPb0r8xf6FzhrqnmgNssApfBAFTfxNmJfNWeM7rHuiucbeV/uE/V11P9a0HBxJLWuICOLqXWG4j9MESTxyJ3cgF7K2GGjDS8uR4QQYDBYdtjcMTKNUYAZAfN0Ti9JpeUVnSs0hioIf30gtRZtUoBX/hquAYzAAr4OSJkDSpp8z4tj1V Ilsutk7N spWevqaQ+HxWCg3jJf08y+pHA9u0t+prXnr7mVuXvnDFbyI3yvZu5k1OOICnN+2vTZYzCCBVwgjZ4PQzot3cAIUV0gktraoTAfng55DJdlyINshBxDKQ9VgOiIxh+iD5aHfOCd8GjyxDT2oTel7JqalvxJTHNwYZXA8zVmbk7DDV18xIwbSb4dKhEnyVO9escqhJ9 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/memory.c b/mm/memory.c index d35ca499bf1c..661c649afc22 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -3158,7 +3158,7 @@ static vm_fault_t wp_page_copy(struct vm_fault *vmf) if (likely(vmf->pte && pte_same(ptep_get(vmf->pte), vmf->orig_pte))) { if (old_folio) { if (!folio_test_anon(old_folio)) { - dec_mm_counter(mm, mm_counter_file(&old_folio->page)); + dec_mm_counter(mm, mm_counter_file_folio(old_folio)); inc_mm_counter(mm, MM_ANONPAGES); } } else {
Use mm_counter_file_folio() to save one compound_head() call. Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> --- mm/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)