Message ID | 20240111111239.2453282-6-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 DC572C4707B for <linux-mm@archiver.kernel.org>; Thu, 11 Jan 2024 11:13:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1D85D6B007D; Thu, 11 Jan 2024 06:13:39 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1888F6B0096; Thu, 11 Jan 2024 06:13:39 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 028166B0099; Thu, 11 Jan 2024 06:13:38 -0500 (EST) 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 E91A96B0096 for <linux-mm@kvack.org>; Thu, 11 Jan 2024 06:13:38 -0500 (EST) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id BC893C05AB for <linux-mm@kvack.org>; Thu, 11 Jan 2024 11:13:38 +0000 (UTC) X-FDA: 81666769716.07.2ED7372 Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) by imf22.hostedemail.com (Postfix) with ESMTP id 45ED8C0016 for <linux-mm@kvack.org>; Thu, 11 Jan 2024 11:13:35 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf22.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.191 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=1704971616; 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=ajY0hzyCvNzVEUMneA6KgjTWRYNBb1SkgAiP6foEfog=; b=rUhDv/AoAWIqHxMJjszOOAERsevkzRzVbxRx9Tud3OxopnjvIYr+tOsS9ZrYtCxt1Ares9 hyAwAvk6LZREX7P2mQrQIA42sOs+Ys9yKq0f71jY0Ew1fqrN+awjszAmPaDDXjCYTn4Jly 7ootkkBieaINImSPKkxu2pBKRD8iTUQ= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf22.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.191 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1704971616; a=rsa-sha256; cv=none; b=S0+MWnug0gbQay6lXGPDIFP3kTAqgpwQ6EyWl9qXHBvKpanSbbp5A9VNPMsewQ9LRZGBBf 2cOJunDarvSWoa7A4V9CY9frfKnsoOGD/znF0d4BGCqY1t6jbuSY2VqqfpQlv0UaOjEEPa J6G0DfgntutR81kYtgi7gg1MvSutc1U= Received: from mail.maildlp.com (unknown [172.19.88.234]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4T9hnq6kH3z2LXJs; Thu, 11 Jan 2024 19:11:59 +0800 (CST) Received: from dggpemm100001.china.huawei.com (unknown [7.185.36.93]) by mail.maildlp.com (Postfix) with ESMTPS id 9BC6214025A; Thu, 11 Jan 2024 19:13:32 +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.35; Thu, 11 Jan 2024 19:13:32 +0800 From: Kefeng Wang <wangkefeng.wang@huawei.com> To: Andrew Morton <akpm@linux-foundation.org>, <linux-mm@kvack.org> CC: <willy@infradead.org>, <david@redhat.com>, <linux-s390@vger.kernel.org>, <linux-perf-users@vger.kernel.org>, Kefeng Wang <wangkefeng.wang@huawei.com> Subject: [PATCH v2 5/8] mm: memory: use pfn_swap_entry_to_folio() in copy_nonpresent_pte() Date: Thu, 11 Jan 2024 19:12:36 +0800 Message-ID: <20240111111239.2453282-6-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20240111111239.2453282-1-wangkefeng.wang@huawei.com> References: <20240111111239.2453282-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: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemm100001.china.huawei.com (7.185.36.93) X-Rspamd-Queue-Id: 45ED8C0016 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: yojah4ag7ycurqm6zefpx7xgwtif1bbw X-HE-Tag: 1704971615-212759 X-HE-Meta: U2FsdGVkX1+CbxD5EI0qLsY7VSghNpBIQhaahhnWsMZKzZSnSc4L4ku/OiOXWqoKlB6gHAE4ywsMVf083syL5gklJThaXVkCjNYbaHpOUcdxP+d4pGmyImlyo5pOYW+eb6+cNSKToEALHUxCZtlu/3lVH14o1vDdZ/Q1IaKABCmcXieEoZVWZqZlwGhXPIQpwwygricyEpOipN2HZ52cGstaWOxs7A27yB5sLw+HESJK6cLH+c/Pz38ADvginnKPsdMgBrYs/HKRsB+Lzu/BGX1HSh/jdvWbsq4vtMi7UToy2e9yaX7fZ3rTwPNNv2X4DEB/+VQReiNorwyoKjrvyVtJWW/L9PIoo4iXbUJdP//8uI8k3a4IB60soqPTUtXtmFSaICSJcAk3xACCdgRmyI6+mao+D+MKrh2kYMlLvwIf5UkkUHiVFT/9aGQ9XtglawmtyGaN28jPfp6uhrXszVugrwiyhXf+YULle1Un+a0mK9hQpMXaON9UAGmVbI1trBLHCqsth0/n9TCIbMT9AtZ4pZ2iJJHTqMR5xVeV+osieg3PV35TZbS/rzypfVuFpVkwPRL2noE12bZi1EdlOYS9y0WAMjtXnjomtaXHc91LMeUONIrBpSupjpEu4bHLlR/AWznUrMdbb+Vj0gK7mF15iomYFTTmr5kI8pdWCdhgdBVWsnlrtwPmV7JDZ2oArYkCTjMbL5FJ4EC/eFjfYZVRN5ifVpQPtC7HGi+/KnyDU9tenZAADaIPBbL3yxCPvl6YQhGXhsqTa364+UXieOs1z5Np2adBQ+PHa3ANeu9xLNHG4bsNDPRS5yCV1NY8FjzlsZ+NK4+hkU2hqg05WhvNb5p9FIXozVCuK/epQnWuni4yGvCV+gSR9Oqmw+Txt3UWJ+3EUeDZOWvoBGQ0S6uuippax23mxDKBTFMuEKtvpWYsctdhtfTswztZHdmt9RMnaGYNTUzt/vE+Nka EJsf8l4O vMVstnAEgiOKaOdlg26tllSdSIY1KsOTEVS4gdgGE53YbVEjzb3PDufdwNVHdD/tdD/vf3La4YzltKKhjHpCTcJMhhWIeG8KXNAeNt0Dk9vw0xDXtdQsysYle8LKb5JBf89DnrCpnCTkdccrREbXQ98E1zQQqINLZmhGAS+vsE63kNI3usgl4QU6fAlx4A13MivLU 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 mm counter to take a folio
|
expand
|
diff --git a/mm/memory.c b/mm/memory.c index c66af4520958..7b3fbeb21534 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -806,9 +806,9 @@ copy_nonpresent_pte(struct mm_struct *dst_mm, struct mm_struct *src_mm, } rss[MM_SWAPENTS]++; } else if (is_migration_entry(entry)) { - page = pfn_swap_entry_to_page(entry); + folio = pfn_swap_entry_to_folio(entry); - rss[mm_counter(page)]++; + rss[mm_counter(&folio->page)]++; if (!is_readable_migration_entry(entry) && is_cow_mapping(vm_flags)) {
Using pfn_swap_entry_to_folio() which is preparetion for converting mm counter functions to take a folio. Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> --- mm/memory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)