Message ID | 20231103140119.2306578-3-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 2F450C4708E for <linux-mm@archiver.kernel.org>; Fri, 3 Nov 2023 14:04:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BB21228000F; Fri, 3 Nov 2023 10:03:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A9CBA280021; 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 964C228000F; Fri, 3 Nov 2023 10:03:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 88747280021 for <linux-mm@kvack.org>; Fri, 3 Nov 2023 10:03:54 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 5422912074C for <linux-mm@kvack.org>; Fri, 3 Nov 2023 14:03:54 +0000 (UTC) X-FDA: 81416811588.10.CF6D0CC Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by imf03.hostedemail.com (Postfix) with ESMTP id CB57620024 for <linux-mm@kvack.org>; Fri, 3 Nov 2023 14:03:50 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=none; spf=pass (imf03.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.189 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=1699020231; a=rsa-sha256; cv=none; b=N9u0CGPj0YFUG0FDNMt08DSXCPM0nNUTYXfi1jEJ+hzZH61wsn5Dwa6v8DLxuET5MZWDSX XhadTJ0cNIKRzN8Oi3T8qQ+eFu/7g5JXg8ugeNn6mgwjeBl1eSO9VUSd+RvzmyUF6Vslu1 9UrquabckjN2THXs4P5XCVH/OmI7uZY= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=none; spf=pass (imf03.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.189 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=1699020231; 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=KcfQLTNeQLYbZjj3Vfq0pzF4qAjIfyux433LLT/5H3c=; b=fGS3ToFBfXMdYfQpjyuGPbUF6Dz1l+IFtcEfsBsUh7yE1kOuI6Fi0GHTAik00KJ3W+Y7xV 8S3hU6+bUSm+PPxy1PGZgdCEqgIvnUVKL6tM6PeHNFdhGm5hrcfeYUEqeZ3+xvg/UCpsQD KEfxYmneWBF+iFAFG3NgQFH2lA4Uv1k= Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4SMMmm5jbnzMmKq; Fri, 3 Nov 2023 21:59:20 +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 02/18] uprobes: use mm_counter_file_folio() Date: Fri, 3 Nov 2023 22:01:03 +0800 Message-ID: <20231103140119.2306578-3-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-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: CB57620024 X-Stat-Signature: f43jztdr871o6xjpcjiuesd9i9xgzpkk X-HE-Tag: 1699020230-226399 X-HE-Meta: U2FsdGVkX19lyGOYpcKxDwR1mQTYNjAjbpfkZrKCpkjL0bF5+o2cKL6MmJKRdOfQVZ8TEDHqjL5R3x1AcITnmhUIjZ+sEPWw/9BJIeRlSsZ6aqJQbhedHzywrbiXqANso10/NV94b8LCmx0P//BxG1Me+oC1KvZrCzS7wgKyAbpnF4voP7H+VBIhh9oMEfLOgKG8vzI8MS6DcT/cukQbe7X+CtytG3FYeWBZl2PEFs+StZ/ePD7M6v+/fMl7ZCFp/h3qdz00lnB9rzLCWDJniiQ9pR2IzL/Vdd516/+vbHADWGILMF5Il0xUlXYLbD+zcORrsctqAzykEAOk3P5Fcy50g5UWp2ccp7P8IgcV1Dla8ns1ejm4F8GLgQUdglu8wU43BtTar6xaCvqtkYQF4d0M3iy3a7+x0Jt5r8kQrLprGR+SlfRHNf2M3jaGKDiF5uLfU7a7DAt7TBXnRjK+8auE+l+dgRo5rGwT0Z1uWWtJUUpm9TWTayzX81y4528BBIuDKnG1AYyYY6MugfZZs0dkJaPlLuRvbI3/QHS60AZt4op3d+nfiVI6ZNEgAcnP3KkaC7FasHpP1SZ0/UmDyFaXNGWu317rQyuS8ZnW9VvfFljjoVOQqKuy7IxE9VFt95BGLpgcbgEJ5/inxotI8fhwDcwsE5Le7VwfRlZ1C2s+YbzALUG2dcrb1hcMupDKT9T6/RhS82q36xWiQOze/z+JEAhzrPGYVcbjDnUMjDm7mGogSesDMW3awOn1ic6LY2b66XVvmZmyyH6qlRM0rZwSWdTTaL2EXu66AYyyG7o2LOnL3JIUZs4mVbUIm0AWbTdrCeMWlh+2kKMwTm53kmHfd4d0MJDgjbEPI1ui/vttKbqWFsUuvbBGznCY9VMsmBqIkJWLs8VWclfKwl8uSWx1ECcGep5Le0yOTD+tnW/jHIND3npxMXILgQYLtEz5O8OWvhUr2eUEWRgJIxu jwGUEfrE g0bRu11oxEM8mlYiaMlF4PvlnCk9wGzz4V8/D5DnNlNi+gxALzz+HtdzUgt4VikKnprnShihoMquXS1Gmz8EV6k5vGPEdPv2nD65btRTjOMUVFNH1ogjn5k+UAdAJtU07bjWqhOaeV9Zy8XLkhxyY6xvm9FabTTW/JWXxniTIuvnIQL2qLIrJ4bE+Ebxn/k+4pJoy 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/kernel/events/uprobes.c b/kernel/events/uprobes.c index 435aac1d8c27..e2d3c89cc524 100644 --- a/kernel/events/uprobes.c +++ b/kernel/events/uprobes.c @@ -188,7 +188,7 @@ static int __replace_page(struct vm_area_struct *vma, unsigned long addr, dec_mm_counter(mm, MM_ANONPAGES); if (!folio_test_anon(old_folio)) { - dec_mm_counter(mm, mm_counter_file(old_page)); + dec_mm_counter(mm, mm_counter_file_folio(old_folio)); inc_mm_counter(mm, MM_ANONPAGES); }
Use mm_counter_file_folio() to save one compound_head() call. Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> --- kernel/events/uprobes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)