From patchwork Sat Apr 15 09:27:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13212344 Return-Path: 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 196CCC7619A for ; Sat, 15 Apr 2023 09:09:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AC6796B007E; Sat, 15 Apr 2023 05:09:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A76956B0080; Sat, 15 Apr 2023 05:09:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 965726B0081; Sat, 15 Apr 2023 05:09:06 -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 86E396B007E for ; Sat, 15 Apr 2023 05:09:06 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 5E8D41A01B6 for ; Sat, 15 Apr 2023 09:09:06 +0000 (UTC) X-FDA: 80683051092.25.6B7E29F Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by imf18.hostedemail.com (Postfix) with ESMTP id 243261C0004 for ; Sat, 15 Apr 2023 09:09:00 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf18.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.189 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=1681549742; 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: references; bh=5QTGLkHRwUitlOFgH4LDIajbtoyyUkiZ4fniTihyVlM=; b=cP5AEpqXmEiUdePq170YbOyFMYqT0IJVRUjr4KHKg0Cp+3b09V7TUrX1xWYZ13h7dPNqny c5ZM1o0bhs7WP5H053vpBaFt8UZTnQUJsjw2BjRD6TCU1Zi0OhbJ71fH4DOr4fAIRHQc9f y67hH75XxOPiIOL0zQDTRVbLsYs9sb4= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf18.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.189 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1681549742; a=rsa-sha256; cv=none; b=MBPzrsr6pzUIWbF4RcJUt3yUTbbCfVG7fDewyR+qZiz+y3V9bPSXwWGCZ3c/Yz4IrKHe4V GYFx1qwCHF6xSBfHPdH5eXcxTY5dONOimIEhpDq2TbLBZqAMgBsXnEiPwPG0XGy4QLPQUx Icri4N8mPfYDWrLGP1Yb1sCSNO6RzJU= Received: from dggpemm500001.china.huawei.com (unknown [172.30.72.56]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4Pz6t04rShzJrRL; Sat, 15 Apr 2023 17:08:08 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by dggpemm500001.china.huawei.com (7.185.36.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Sat, 15 Apr 2023 17:08:55 +0800 From: Kefeng Wang To: Andrew Morton , , "Matthew Wilcox (Oracle)" CC: SeongJae Park , Hugh Dickins , , Kefeng Wang Subject: [PATCH] mm: rename reclaim_pages() to reclaim_folios() Date: Sat, 15 Apr 2023 17:27:16 +0800 Message-ID: <20230415092716.61970-1-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 243261C0004 X-Rspam-User: X-Stat-Signature: miz4yc1387hr4tkb17hqsspj4amumpxj X-HE-Tag: 1681549740-442234 X-HE-Meta: U2FsdGVkX1/rUxHjIAjF5nYMiWsGGatKMHD3SppwjH664GeUw3hrzZ8kt+AH7+nyR5kjT1NoMm97xMlr1aecYCbD6xTD8/FWfQmcPqrC+D54P/bwZWdafxLprVK4ep4fViAOHbe8yClkLH8NWT9hGkfggXWgh8IZtYe5o9BeRmRiMJMSilhmxNJ9pAhAg1kMv+QCmV+XM4I9l2mdliuXPSluxkoTwZoycaGCB71viu1pyciaqubzEGcBKwwTfR8+aEe8hG/r7uCfzzxDaOkIZ07d+olMNbLp9hG5aw097RtC2yLlKzJm1ruK280qBYStged8s6wQrKq5KX0UTkw7Z1v3B07xOdVwNULWNlknUZe52unk25NlAvm/hQjAcmqXpgoqadoOb4y/UbK7C/eYVkTQMeS2SKFwl8oqGTcVI/Mx4Yqz6GnhiQ8+XxFSGl4BdAqi8phloj9w7ki0jzPMc0w4DH1lTBpyD8FyKGE0e64mdpmcHsnTl0tBXOW4C32mIOMGlPjMaEb+/y6IdwRbQ28Nlo6BhqbxOL56a2Beo0hfJrOpZ7CvDk5BxxytRBCtJ7MC0pQfi5feqJk3UPP+aAXa3LzUnltqtzR7u1VZ/OmqDWPpjWMZZKSMBcwHGU3019l1F5hwtQZ7/vHLXmn4V9vTkyfuS6hJ6LwNV56o+tJzU7YZjkIPX5oldfTPzTU0i2YCUgKeHTrV73HgviZNxUpdgKSK8y2KzLaMIkyDbTFksVLrnyV2DYqIRHZVSYglhB76N539umzVE1x67Su84B/+I3m99x+9Q8JCpeDYGSwdHxh1a110kmElh8ObdNlDJ50BuMNW1zJEhKyuigwN3M1H5bqav+MjJ3BBeYvB62Nx/cSY90VWfAtXMlFhqu+LhBxhaCE8JUiNfv+V+L8Fxkf5erUPFuwa52J3+XYsC/Fu9NOFWMW6QLYtwiNcrFtePA8vh15ice1zr8l8r6m DMY9itDV E4bP7X/aZth4G23mg9GQWxmErAvZh8kvv/OucEQBF1+kixeGMDgGy91QeaLKzNN7ndfJ2HkXnhzDpwQ8658p+qRjSizMA7pYZjNFoSiAnZ/AQTJF8R8g2YogTBNVpUpoOOy3YE+Q8pK2SjJ55iWAjMY1TxaA6EiYi1PcOP32+pFZb0DwdyRVq6ceSnjtDN4WzwKgjZj6J9UHVBSp92gWA7UpyAg== 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: As commit a83f0551f496 ("mm/vmscan: convert reclaim_pages() to use a folio") changes the arg from page_list to folio_list, but not the defination, let's correct it and rename it to reclaim_folios too. Signed-off-by: Kefeng Wang --- include/linux/swap.h | 2 +- mm/damon/paddr.c | 2 +- mm/madvise.c | 4 ++-- mm/shmem.c | 4 ++-- mm/vmscan.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/linux/swap.h b/include/linux/swap.h index 7f7d5b9ddf7e..8c8c6ceaa462 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -442,7 +442,7 @@ extern unsigned long shrink_all_memory(unsigned long nr_pages); extern int vm_swappiness; long remove_mapping(struct address_space *mapping, struct folio *folio); -extern unsigned long reclaim_pages(struct list_head *page_list); +unsigned long reclaim_folios(struct list_head *folio_list); #ifdef CONFIG_NUMA extern int node_reclaim_mode; extern int sysctl_min_unmapped_ratio; diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c index dd9c33fbe805..840d25ad9e59 100644 --- a/mm/damon/paddr.c +++ b/mm/damon/paddr.c @@ -255,7 +255,7 @@ static unsigned long damon_pa_pageout(struct damon_region *r, struct damos *s) list_add(&folio->lru, &folio_list); folio_put(folio); } - applied = reclaim_pages(&folio_list); + applied = reclaim_folios(&folio_list); cond_resched(); return applied * PAGE_SIZE; } diff --git a/mm/madvise.c b/mm/madvise.c index b5ffbaf616f5..bfc683de85ef 100644 --- a/mm/madvise.c +++ b/mm/madvise.c @@ -417,7 +417,7 @@ static int madvise_cold_or_pageout_pte_range(pmd_t *pmd, huge_unlock: spin_unlock(ptl); if (pageout) - reclaim_pages(&folio_list); + reclaim_folios(&folio_list); return 0; } @@ -513,7 +513,7 @@ static int madvise_cold_or_pageout_pte_range(pmd_t *pmd, arch_leave_lazy_mmu_mode(); pte_unmap_unlock(orig_pte, ptl); if (pageout) - reclaim_pages(&folio_list); + reclaim_folios(&folio_list); cond_resched(); return 0; diff --git a/mm/shmem.c b/mm/shmem.c index 16378b281a5d..bdb2948a149f 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -2381,7 +2381,7 @@ static void shmem_isolate_pages_range(struct address_space *mapping, loff_t star folio_put(folio); /* - * Prepare the folios to be passed to reclaim_pages(). + * Prepare the folios to be passed to reclaim_folios(). * VM can't reclaim a folio unless young bit is * cleared in its flags. */ @@ -2406,7 +2406,7 @@ static int shmem_fadvise_dontneed(struct address_space *mapping, loff_t start, lru_add_drain(); shmem_isolate_pages_range(mapping, start, end, &folio_list); - reclaim_pages(&folio_list); + reclaim_folios(&folio_list); return 0; } diff --git a/mm/vmscan.c b/mm/vmscan.c index 2cd21e1d5849..b218c8a6244f 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2786,7 +2786,7 @@ static unsigned int reclaim_folio_list(struct list_head *folio_list, return nr_reclaimed; } -unsigned long reclaim_pages(struct list_head *folio_list) +unsigned long reclaim_folios(struct list_head *folio_list) { int nid; unsigned int nr_reclaimed = 0;