From patchwork Mon Apr 29 22:44:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13647841 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 57BEEC4345F for ; Mon, 29 Apr 2024 22:45:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D48636B0092; Mon, 29 Apr 2024 18:45:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CF7F16B0093; Mon, 29 Apr 2024 18:45:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B991B6B0096; Mon, 29 Apr 2024 18:45:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 9CFF36B0092 for ; Mon, 29 Apr 2024 18:45:01 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 2D8E0A10B7 for ; Mon, 29 Apr 2024 22:45:01 +0000 (UTC) X-FDA: 82064051202.22.12B37C4 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf28.hostedemail.com (Postfix) with ESMTP id B3310C001D for ; Mon, 29 Apr 2024 22:44:59 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=DbJ0bdvv; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf28.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1714430699; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=I0kweNF+ZVAxhTt9RJD9A2Y4xwOlXjmGClkeDC8Y6oQ=; b=O6kcnDfp8JCvjkyt0ax/F7QPkOfk/SeuZYE1UNYBsWgj0jt2PGQsn49XCuRfNkjFNz4ys/ O1FgxcZDOhy1MqwFUX6XFK3hK40JGRuOEl7WwaJJF3Wa+d94aZFLpVcQ9huSXwEFPieU3n 9vhs4JqPAltrHhbWfD2Nw3QQGLl56Zo= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1714430699; a=rsa-sha256; cv=none; b=Z9lxVQN7dEh/YGihpIEYAJ686Y8YfZ/94tOaIVxvotWsjC9B7Jwde9DKxsCqP/HDtXA9Cp xeS6KavzNu4SiRs+d1ta41TTHpSJzTioznfgWX0Q+tC5JrwT9EUDA2Jw7/gnDXuproqJ3J SNSp68iqBzmOg27fV+b5k5V9oTARWw4= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=DbJ0bdvv; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf28.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id CD76D6115A; Mon, 29 Apr 2024 22:44:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 449E6C4AF1A; Mon, 29 Apr 2024 22:44:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714430698; bh=rwwV4wTGLuB7cXfIuHMVaw/1/iqBkA9IvJM9bkgx3iA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DbJ0bdvvJr2AhyvwGW00oQOrnMQxpSdiFdku3EzCB5Pf8qz+KnEJFsIAVPLJBn7LI fOmyoYPY5MRuwZBCR4WOPYYORsXzorDi6hZCCTY3ru1Roc99UOGEbt5PTsJSlX/pnH 2redK7kxVZ2sOhiba6ZfAHri7YUTXSUDxn3qDmziId7BKHORNZ9aiMm8QskuSYduu9 MRbV+SnE0GV7XVoDV142dQ3T5d8IXuFLGuaud4T5UEBhwFbJAeAYHQgYOzW23RlSV8 qlmXHL6C1cICKky/VRmu1IKaIVZPSOHqyfco/70bB7Psw5rlpb5iCxgzlWwiBiMrfN cRbHEA0E3zluQ== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/4] mm/vmscan: remove ignore_references argument of reclaim_pages() Date: Mon, 29 Apr 2024 15:44:50 -0700 Message-Id: <20240429224451.67081-4-sj@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240429224451.67081-1-sj@kernel.org> References: <20240429224451.67081-1-sj@kernel.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: B3310C001D X-Rspam-User: X-Rspamd-Server: rspam03 X-Stat-Signature: k4jhaac6ndig11xsipeyiwxi5q8e4moi X-HE-Tag: 1714430699-858566 X-HE-Meta: U2FsdGVkX19LI6AsqTU7xJXmLxuejek8bYQhpg59aHDoGK9pK3QTJd9CakAGTuDpbKcoHXAzLbL5vr2aBhqtp3jbDkGm0SHtyFO1r4Niz+24DBYVMRIb3tYvOsR8QJ3eUAWpaaqJ6Myr2Z6Kie6Q5VTregf257ihXitrr2zjmZEBKYbvsuutWoco/MeiqZyqO3V5BseOTqdC/A669P+55EmVmYFhXWqu1YXxoCRPEQmAVkig6CeqFMbLuZG0M733n+YeWHIdg4vfTIVpaxzhcQeFT8F3Vm+eq+cPRLi344nblSw8aE4qTFBHUMOs0s16yc22lO3gzShZR+UBauIlWs2V6BTdoVQ/6LnMfFxYdm/4StpeF4V2VbnV5IsjPkk8As/nHvsDUuhCM0E1pHJ1Xm+/6IM6PVYnInrzgTfwdtT/0cT2tPZ3x+JepeE/YAecWEhfc0CXe9v6WwUOlb3nNUxPqrVs+A4SQWReNDQ1/a0NW8yQm2PPUdhNsIuXPipK79Y283XHQM4v/hkwCB8EzKOriXjBkcbOTl6Lw0NnIUfJqYX+uA4zj3/E1/pqD5bR9BOtl/cXVy0EOdN/5e4QzzvRJEsNTJMu3Yd8XZjXYOYiu/mOMNw7z8DEQNpPJkp6CxKkCkhvkXta+nQEYQLNcyNBUkDE6fkdPehcvIiOlYN5vcqC8Gl2TZfkWbI3qPHvFrRTDHNg0mjkDmYX3vTk0zTHGWLovXNHHBYZ4p1nD22m39UMhb8aw/cAs36oFOhPYoTLJzalgX0yBJluCSSagD7TCrpFa4vpMgOr8RrLK+my7TkoHhlAR+ZVOauWwJIoaG6vv3gkLH0EsvDow3h73El2mIj6GSve2HKl6yXaCD6cjB+yHGn4hYl3/+LHHmRazdeLKpgPKmANJSlZ+bel5HPXaX1ymDiGaVwWRuO9PHLgQ1kYb4OZw4AsuREH4BM6z74OHIVDfm/s+lRnvIT NV59xB8y OhYvm 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: List-Subscribe: List-Unsubscribe: All reclaim_pages() callers are setting 'ignore_references' parameter 'true'. In other words, the parameter is not really being used. Remove the argument to make it simple. Signed-off-by: SeongJae Park --- mm/damon/paddr.c | 2 +- mm/internal.h | 2 +- mm/madvise.c | 4 ++-- mm/vmscan.c | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c index 974edef1740d..18797c1b419b 100644 --- a/mm/damon/paddr.c +++ b/mm/damon/paddr.c @@ -283,7 +283,7 @@ static unsigned long damon_pa_pageout(struct damon_region *r, struct damos *s) } if (install_young_filter) damos_destroy_filter(filter); - applied = reclaim_pages(&folio_list, true); + applied = reclaim_pages(&folio_list); cond_resched(); return applied * PAGE_SIZE; } diff --git a/mm/internal.h b/mm/internal.h index c5552d35d995..b2c75b12014e 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -1052,7 +1052,7 @@ extern unsigned long __must_check vm_mmap_pgoff(struct file *, unsigned long, unsigned long, unsigned long); extern void set_pageblock_order(void); -unsigned long reclaim_pages(struct list_head *folio_list, bool ignore_references); +unsigned long reclaim_pages(struct list_head *folio_list); unsigned int reclaim_clean_pages_from_list(struct zone *zone, struct list_head *folio_list); /* The ALLOC_WMARK bits are used as an index to zone->watermark */ diff --git a/mm/madvise.c b/mm/madvise.c index c49fef453491..a77893462b92 100644 --- a/mm/madvise.c +++ b/mm/madvise.c @@ -423,7 +423,7 @@ static int madvise_cold_or_pageout_pte_range(pmd_t *pmd, huge_unlock: spin_unlock(ptl); if (pageout) - reclaim_pages(&folio_list, true); + reclaim_pages(&folio_list); return 0; } @@ -547,7 +547,7 @@ static int madvise_cold_or_pageout_pte_range(pmd_t *pmd, pte_unmap_unlock(start_pte, ptl); } if (pageout) - reclaim_pages(&folio_list, true); + reclaim_pages(&folio_list); cond_resched(); return 0; diff --git a/mm/vmscan.c b/mm/vmscan.c index 49bd94423961..fc9dd9a24739 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2150,7 +2150,7 @@ static unsigned int reclaim_folio_list(struct list_head *folio_list, return nr_reclaimed; } -unsigned long reclaim_pages(struct list_head *folio_list, bool ignore_references) +unsigned long reclaim_pages(struct list_head *folio_list) { int nid; unsigned int nr_reclaimed = 0; @@ -2173,11 +2173,11 @@ unsigned long reclaim_pages(struct list_head *folio_list, bool ignore_references } nr_reclaimed += reclaim_folio_list(&node_folio_list, NODE_DATA(nid), - ignore_references); + true); nid = folio_nid(lru_to_folio(folio_list)); } while (!list_empty(folio_list)); - nr_reclaimed += reclaim_folio_list(&node_folio_list, NODE_DATA(nid), ignore_references); + nr_reclaimed += reclaim_folio_list(&node_folio_list, NODE_DATA(nid), true); memalloc_noreclaim_restore(noreclaim_flag);