Message ID | 20231103140119.2306578-13-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 1454EC4167B for <linux-mm@archiver.kernel.org>; Fri, 3 Nov 2023 14:04:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A9ECE28001C; Fri, 3 Nov 2023 10:04:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A4F0028000F; Fri, 3 Nov 2023 10:04:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9177A28001C; Fri, 3 Nov 2023 10:04:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 7CB3628000F for <linux-mm@kvack.org>; Fri, 3 Nov 2023 10:04:46 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 55DA4160605 for <linux-mm@kvack.org>; Fri, 3 Nov 2023 14:04:46 +0000 (UTC) X-FDA: 81416813772.09.A187E57 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by imf22.hostedemail.com (Postfix) with ESMTP id 23F42C0075 for <linux-mm@kvack.org>; Fri, 3 Nov 2023 14:04:32 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=none; spf=pass (imf22.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699020274; 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=OeTPIw8gaHpYgTEOA5d0ZjkKIpqPK2yWIYgWH1aKTeY=; b=IC2RTNk0uGQ/P1z8iG005m6Ix4cD+ixTNVts2MDgkTejlTNqH6gDtMKLpkQLaRRAryHVoj C7Losz6FkZ4OUpt/iSSlLrI6cEzY+2D2+mZB6jZGomZHAMKZnQ+aIz4SfKPDyXPVfSuYdH dD37D7bm0WV+R/W37thnuGgxlmy26nk= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=none; spf=pass (imf22.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1699020274; a=rsa-sha256; cv=none; b=TYEjinLPuGTDmTvs5+Lwqn5N8Vn59o2ODg2QbSIKghmr4CiZ0+MjlsZvqMmJx74BlEoBbx hTh7ib/5qSHTjNYgkYopFjZtDCpOTLyKUjixnvHKFYC0KLJ8HKa0/xroGfr5dF9I41Py2l Ttpnh6OvKqdLtlB6ynOdm+6UPdOCCqQ= Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.54]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4SMMpQ0kJMz1P7p6; 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 12/18] mm: memory: use mm_counter_file_folio() in set_pte_range() Date: Fri, 3 Nov 2023 22:01:13 +0800 Message-ID: <20231103140119.2306578-13-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: 23F42C0075 X-Rspam-User: X-Stat-Signature: f546y73bgu1z8iigpurob3i79e7g86qe X-Rspamd-Server: rspam01 X-HE-Tag: 1699020272-551236 X-HE-Meta: U2FsdGVkX1+yspgYhKfwMRkCekS6UK0Q/vtU14hgDOz8yVpZo1kd7glehHD3bXseXY82fzIcdnce5L6aomzIsFvsduNURxXQizDd0l4qnjTnjXekW/7e/hBWFznLmQthnx6rFKOiYuSETskqN5ehNjUFV51dhXwCBkQaJai99lkVbKDd5LLscO6SDFS160gh7oIgci60qO8nT2Tc9w2dBPt3M6JF6ImVsqluJkI4X3zwX0kb8VIN3eywMl/LQiePkax8OjyOt+FZsN0EA5IYJ6i2HP86W14Jpt8T4Wz9rKTIBKqWnKCLDH/Vp0+CwtnUuYqQIGmGobEYZucAHY9PUwUTGcK2btrTNnpLT+Y/d9JbwRiglFIKZpSMAddHonWZaRrUSPHptYKC63XVQrNtsV+JyLHPu4rFVGK23S7s6E9uE+uLoRJblQFrkzC+HdPgPK1vsRo4swULxCXeC3GPDq3W/Ljt+pyPQVB7auJGaLChKlCIujUV91c7Kz3MY0ySJ6h+SggG+9FUdAaPqdAC1g4OP77OCHvrcxQSIvf2o5ym/3CYYdXpO4gQYy0VzROYtM0UeKnVSyuV5ddkma1AVTGD6AL+fEh3PHPo5OZc/DZbujT/B6Xbm+/47ELB6QZ8Ip4tebW03yErGK8yZuSzrHBmL5F/FdtyeU1XilIYN3SGbi2EAmn56cqGsZcGrWLY2ft0S8AIYrQ92F7gFQRdnw9Y3MrB0Zse5+iPCypoG37mxPZ7d7QsJnIygQeeUlXkSnJNTBqxCV3oAS8KHNSmcgKi1rXk0iuiNKbq2ezSl9EC9h2PQoghiRUIH9aqKiJ6bLpwYac7SeqDf2z9GoXIyg0WVWcrIhP4zzifcMpIrxwARPBxbcUCTSsBED5teiXIfvpnMGS+bXnS0KehlJ5YI+FzNaEhjDxjc11vdz8soykHvSRZOrWZj6aC8CHEyepRTx+76BryILrdItZSk+9 lEsK9Z0b oFK2qfDoYuGG4eRXgasj494tMRqYdAbJjs/FBcoOv5B2FEB0SNoL29Uq9oLiMiEGniRYCXQvTkdNKKp2CwcmOlqX26XUH1HCNIU+QiSRhqmOZPlZHwDH3CBUwmyD6SROrCv9nyDpbxtHcWNfBouLQof4CwuLBkHOlwQFDGrQgQlqMdxTIzoby9pziwaZOol2/BVSJ 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 661c649afc22..2d90da70a1c8 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -4414,7 +4414,7 @@ void set_pte_range(struct vm_fault *vmf, struct folio *folio, folio_add_new_anon_rmap(folio, vma, addr); folio_add_lru_vma(folio, vma); } else { - add_mm_counter(vma->vm_mm, mm_counter_file(page), nr); + add_mm_counter(vma->vm_mm, mm_counter_file_folio(folio), nr); folio_add_file_rmap_range(folio, page, nr, vma, false); } set_ptes(vma->vm_mm, addr, vmf->pte, entry, nr);
Use mm_counter_file_folio() to save one compound_head() call in set_pte_rang(). Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> --- mm/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)