Message ID | 20231103140119.2306578-18-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 53BB5C4332F for <linux-mm@archiver.kernel.org>; Fri, 3 Nov 2023 14:22:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DBC8C28001C; Fri, 3 Nov 2023 10:22:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D6A8128000F; Fri, 3 Nov 2023 10:22:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C593228001C; Fri, 3 Nov 2023 10:22:21 -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 BA41428000F for <linux-mm@kvack.org>; Fri, 3 Nov 2023 10:22:21 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 529A2C0A56 for <linux-mm@kvack.org>; Fri, 3 Nov 2023 14:22:21 +0000 (UTC) X-FDA: 81416858082.08.B70E050 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf28.hostedemail.com (Postfix) with ESMTP id 44627C0019 for <linux-mm@kvack.org>; Fri, 3 Nov 2023 14:22:16 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=none; spf=pass (imf28.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.187 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=1699021337; 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=ACB6BvRM+b+Bk9pCuWZqJNSMpJoUalDpqlkAQM+jcRA=; b=c5rBwdYeR0zaswuroduPktkOShBn5+hAmuHYABPIQHkh68InxVj0NbqYwjQ0HJhm/3qexL M+PzicSThqU2Qt6fPiIKmeJqxWmn97x8Bikei+2SVksQFr9x9bgbIt6XOjQi6yeIlK/3WW FeMwquxxrgAjkrk4YLuA8by1y8zvRNo= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1699021337; a=rsa-sha256; cv=none; b=qOyLLNYoS7viXOqodYD5HV0FW5dmR69bxeDQ/NsrD7FW5tCQgxbyYJ7iaJgaoNbDjoUErI G4G/aAIU3BYrpOoRYUKEa7u0gFhSkIYX/8OdyQabk5I8Pf4Typ4ZQloZuKCcSQ4ZvkaUM4 N9KUPqVE51HmU8a2a8Cjh5btxZiOt8g= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=none; spf=pass (imf28.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4SMMpP56DszrRgH; Fri, 3 Nov 2023 22:00:45 +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:50 +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 17/18] s390: pgtable: use mm_counter_folio() in ptep_zap_swap_entry() Date: Fri, 3 Nov 2023 22:01:18 +0800 Message-ID: <20231103140119.2306578-18-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-Stat-Signature: 9eqb36q7dw47sbkz6gisit9jbqw4jfwn X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 44627C0019 X-Rspam-User: X-HE-Tag: 1699021336-300041 X-HE-Meta: U2FsdGVkX1+PKpc+aLrAZ3yJmtgvZKRW3hCQuSYS7JcTkepvDjb4mzsFe18OjgjWOvfGsUnl3WivENw0W2rK5fArr1BVt+nSIW80jCFt7XyJh3blYPKN7BAB91mP+uEMCsOKbU9MGeFKifVVhVcdORfO2fQ7ApnXKxH2udLk6i0UA07BeuPQ5Us8D5Q/nAnHRrkuQzSTyiNFaRpsxFiNm2cYyDFlfF8Iv6Vcyb7Xm8UT6jVss+xWjF2+OIr6Y7IUdLO0rgU9tlNmPPZKM9sXHaEiwN0cb158UDLU0M7d8scB35M+eXS5RU55rnuEq3oed90bTZe3LWERUkaYuzzPGjuJhlVQ9q7lDRBE4LD9WOaqJ+rQDXoRglzDVAvqWpoQn8Bm4UpaH94z4FFcEF+srBdQei/l44aLTeQgpEBXEWO6azrG1be0gsfGMK5rYinzT8y4aamwm/CJ+AtExRMQ160twft7upNGxx6oI8vYyjOoJRWUGK8OinYSnnX/vPxQckGBN5t1wQtmXNjWO0n69VQ9VP9CYqBYWyJhLVXczNXNoWRjVVs+81AJPk54Cgn8qk11BoF0OT4loNWVCuzWBmfeCuWEcfUK5irUkdo85giZQC9MPwus9josen7jzVPsJjzCzFlwtdTd0jeXXrfm4WmhFj03AF+W/28+ep/RlrX7cVoRehQ7PiUKjCCuwQeRDeTBp3pXseksLxAt6Z3HsDKhj14PjX8mNlIZoW6zpEvNy5DxfWmJMg1guoQnF5uYZ6zu4IHSDRbT+/lSCY0ZYvPBr3tpd704i9YjQF4Vtj5jdtfw1mkrToAG/mpRuIp75ISgykbdvMam83M6xL50V1wddwOmCeAREBKMwQwbq4IVbAJMAwplQlAQElXoWPnD0ouyY2Ivf0U4Pmt+qNcqsVqyleERDpOO35XPVpHcC0bPtq+N4Io8ONtqZsAi81J0WXUskBsJACAyF05kjVo vLZIUGRh XltzIuehHaycyFs3EogHIxYKpK58admyhPLaFE17+SCWjdtt4TLHnSj/UAGqcDEBJFByobSFpUa7cGD3LBJD8olL0AJC1M5WnKxnoUFf8vHT5uEaJ6a18AKywgUZW7mo2FxbhNDQUCWKFN0Y981HI0ONGXNKioRqpyF8dGJZH8XDmdAghoC5HPPGOysUQjxWvKn5E 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/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c index 3bd2ab2a9a34..f4a53f5b0bcb 100644 --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c @@ -730,9 +730,9 @@ static void ptep_zap_swap_entry(struct mm_struct *mm, swp_entry_t entry) if (!non_swap_entry(entry)) dec_mm_counter(mm, MM_SWAPENTS); else if (is_migration_entry(entry)) { - struct page *page = pfn_swap_entry_to_page(entry); + struct folio *folio = pfn_swap_entry_to_folio(entry); - dec_mm_counter(mm, mm_counter(page)); + dec_mm_counter(mm, mm_counter_folio(folio)); } free_swap_and_cache(entry); }
Use mm_counter_folio() in ptep_zap_swap_entry(), which help to cleanup mm_counter(). Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> --- arch/s390/mm/pgtable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)