Message ID | 20231103140119.2306578-18-wangkefeng.wang@huawei.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp1055909vqu; Fri, 3 Nov 2023 07:04:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHjX1TW6ufVUhKsF7nkADl4nsxkggbqsRBmDvZAh4m670PKfbBQR5byGvpo5TGJ4zSRxZ6N X-Received: by 2002:a05:6300:8084:b0:180:d81b:65e0 with SMTP id ap4-20020a056300808400b00180d81b65e0mr13330659pzc.3.1699020268863; Fri, 03 Nov 2023 07:04:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699020268; cv=none; d=google.com; s=arc-20160816; b=Kj1nNDhQzkiTinZR33CpoebgCG1FY1yLMXl0bvSvrpGRyfTXqhHuuiYIYZOyUIlxId WkWmvAH7ySAfrQgUGQNKK17YzOFmzs7lpph6R3xfWoXl3ayZ6SzPvu7lvzPpIC6kfwF7 fDczNq2ViA2UXkXCcRRZMsxV3P8fei1PFBcHxWAm8fWGTWomjbwoJPXS0xJkAeV/pExR iK9EtOOPTd1Gt4aOr3/TtprHW6E000JYRCRguHjPJ0OtBP18YkSSfxc87Uc1wl0TycX9 yQDyuqnvNdOpRH7RLWqhARdnJU1yQaUh0bhmpJ7GYBr+2iFTdhMYlVtYsfsNw8Ytrna8 XHpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ACB6BvRM+b+Bk9pCuWZqJNSMpJoUalDpqlkAQM+jcRA=; fh=kUj/5waaepfljbNx30rj2BALdV0u/mUCTaFWThlgquQ=; b=AZlhzIOt7/QmoSBy0OVhFlsYsk3YFtjjVAvTqJrU0mKgi42entHb+hiL87WSIo4J24 HswE2rEojBbhg3P7pWuME56prlsoAyWF+V7/lc3hl5PRaKQqsfEliq5bIxhhhrLyBwVw rUMobqh+P6C1L607WO5QMpPs3O5baq3KT8SIFPevh6V3JuXrz7ZiMnNTNkID2HpXSxVK JSeF+/b8RlTTnGm1PN76R2NYG59r27r8trwLo4aiAWXwEBYs3rmEFAfa6VAJi+iIXI6d eZQQlPcpkhA1LSnAJ5iHAuFU85T51OUFJ5fGEmvGS+kr78/LI57R+ixN0u061c/zBJPC B/hQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id o185-20020a6341c2000000b0057d7cff25besi1545060pga.829.2023.11.03.07.04.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 07:04:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id BCCF4803E4B1; Fri, 3 Nov 2023 07:04:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377878AbjKCOEG (ORCPT <rfc822;lhua1029@gmail.com> + 36 others); Fri, 3 Nov 2023 10:04:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377813AbjKCODz (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 3 Nov 2023 10:03:55 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4703AD64; Fri, 3 Nov 2023 07:03:52 -0700 (PDT) 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: 7BIT Content-Type: text/plain; charset=US-ASCII 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-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 03 Nov 2023 07:04:13 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781551877201669421 X-GMAIL-MSGID: 1781551877201669421 |
Series |
mm: convert to use folio mm counter
|
|
Commit Message
Kefeng Wang
Nov. 3, 2023, 2:01 p.m. UTC
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(-)
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); }