Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1665539lqa; Mon, 29 Apr 2024 15:45:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWfoRswjs9xkOFF90JEnZji7HIX9jLXuYKD7MFPdtly5LB93YVIuvKPF6/R12ECadAk0zoavFtu7KZE+D+1OwF3rgApgJEOqErzjjelWA== X-Google-Smtp-Source: AGHT+IGvqylcrmaa70IUjRK0OEHp8jxWJi2c7tAb0DVm48UyFxd36BwZaZ5sK50mQEsZRdfAzZo6 X-Received: by 2002:a17:90b:3d4:b0:2ae:5adc:1ef3 with SMTP id go20-20020a17090b03d400b002ae5adc1ef3mr11801882pjb.34.1714430735233; Mon, 29 Apr 2024 15:45:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714430735; cv=pass; d=google.com; s=arc-20160816; b=lO4qKXwG9Zd3VN8uwJnw6S9eAunMGwuV/4dQ1tyZkDyx8KO9kGy43CgrLGFuDfCm/e u8sE8IPQ32QOvVQRteNSqkBiq/3AaL5Vn8l+1rvktmyjy6YEmfSo//YQ2Xisayy8LgES bP7xY2bv7uvWtD0aAMb90ErC4vpx9BL7haUz6GqTCSyhdVwdGeZQBInsWqAHxDrqqvk8 SHKhcwq6ugPawacKmsaLkGQ4nModMNyl+i1ZPz27+66NxLQUcqtvOSiKS9i6JAqOmDhu gKkdfc5vOU4SdhVAOtSZnBMctuVeOO70y+wJ3YpdJ/WFpE+yDhRAtt5TfPEralHG6emR jgZg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=5n2rrgpLyVIJX1+QKss1cT1kREjQbq7BJIeXYE8zFfA=; fh=a53F7w6tZzc3hfDQukhgJD8HGhVSKX/GfVcH5MFgNCM=; b=gu1vdV3cn4XcTvkCkT7weQ6jWg8Q7dNV4ZSgKH1LrWMR7u2Sicjs+Udg++z+zr3GPz MafPAPLfJk8uZyKY4fSD1Mt8PKVvAIgaS4Chw6h+sZj55ggOoTKNSXVhIuTC5oNd9Led k+bGfir/m6YPW5tk1DluNhyleRuFpT44CEpgnePmmNh2GIINOu9FAj+yt++aiLAp/kp7 Yv4zCWvQMF97nxMfCDFxpQDYgtrTUdJmLoBzHGjJPtkWEAhznynmF7+sSREIHJVXgdA1 SM7uKH1V6kq0lRDlzF18YlscuPZ/itTiQ2sgICRHNU66Si+s6WrWFVKBL2Gfk4Yy1HD1 9OZA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JTjkOLRZ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-163113-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163113-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id cp9-20020a17090afb8900b002a4aba1542asi22318024pjb.79.2024.04.29.15.45.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 15:45:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-163113-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JTjkOLRZ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-163113-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163113-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 9B26A283358 for ; Mon, 29 Apr 2024 22:45:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1BAD2194C85; Mon, 29 Apr 2024 22:45:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JTjkOLRZ" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 43DF01465AE for ; Mon, 29 Apr 2024 22:44:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714430699; cv=none; b=GxMDa2X2Z9xF43oYLiPQtPfDAiRvIjefVJsWly3MX5NJissHS2OV999e7V+AK9FeptAmh+Kyhq8ow/pFMZ+i7xzL03Ni0TCX3tOBTlESJZN4D86KzqEqti4qDD5O1g8jna9bJcsMB8IJOGXYWO+0+4MpurpeQzVkrbIzfhtwIDY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714430699; c=relaxed/simple; bh=c5R6Q+jjynMcjdwz6qj4TecKkTHs1L5RszRXGVX69qM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=gtwRX5HWvco0SB9J5suwieQ4Z1s3mbAiZ4KHrPQmQ9YnJYrgXK7BMuLXjOVhylRhRtZXaGGMAqH4WTkBig6Lo4UbEVOMle/8P0hQ+gfEdGo5fSKKFtMv6g/4YhF9493wQLmCoM6+HsHp5MokR4fy/T8JZ9x92TLQfYFQ9MxQd0o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JTjkOLRZ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D15BBC4AF1D; 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=1714430699; bh=c5R6Q+jjynMcjdwz6qj4TecKkTHs1L5RszRXGVX69qM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JTjkOLRZE9RqeCYWNPbhtB3eMRNA1PWdYKagaygW3idDe5DF9DoUFJlKXawa1JTc7 FXrLTXWf1G5A4F6yyy7KeJSlzNz4sRCP3ri+aXxImbHD7+fxJ4QULrRGovvhbbB22y IoPHoE8GkyPAIekuzdETf1v6rweXYfpDa3g2ZtsDelCZCaWUQcZp9CzEPa9ZEEjIQ8 VARWTl2bWuYKJiHNVmIEnZwE2T0i2038cRvt7hIAQDIajci0r/UACkxR5HE5IAguPz GDxxFNCaFeHaJNGWszvbnwZN2khwABDsWrqnAZT4K+bOf98Vbw9C/VQiIcHNHeKgwQ Dg/OtCgjYSG2Q== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] mm/vmscan: remove ignore_references argument of reclaim_folio_list() Date: Mon, 29 Apr 2024 15:44:51 -0700 Message-Id: <20240429224451.67081-5-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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit All reclaim_folio_list() callers are passing 'true' for 'ignore_references' parameter. In other words, the parameter is not really being used. Simplify the code by removing the parameter. Signed-off-by: SeongJae Park --- mm/vmscan.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index fc9dd9a24739..6981a71c8ef0 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2126,8 +2126,7 @@ static void shrink_active_list(unsigned long nr_to_scan, } static unsigned int reclaim_folio_list(struct list_head *folio_list, - struct pglist_data *pgdat, - bool ignore_references) + struct pglist_data *pgdat) { struct reclaim_stat dummy_stat; unsigned int nr_reclaimed; @@ -2140,7 +2139,7 @@ static unsigned int reclaim_folio_list(struct list_head *folio_list, .no_demotion = 1, }; - nr_reclaimed = shrink_folio_list(folio_list, pgdat, &sc, &dummy_stat, ignore_references); + nr_reclaimed = shrink_folio_list(folio_list, pgdat, &sc, &dummy_stat, true); while (!list_empty(folio_list)) { folio = lru_to_folio(folio_list); list_del(&folio->lru); @@ -2172,12 +2171,11 @@ unsigned long reclaim_pages(struct list_head *folio_list) continue; } - nr_reclaimed += reclaim_folio_list(&node_folio_list, NODE_DATA(nid), - true); + nr_reclaimed += reclaim_folio_list(&node_folio_list, NODE_DATA(nid)); nid = folio_nid(lru_to_folio(folio_list)); } while (!list_empty(folio_list)); - nr_reclaimed += reclaim_folio_list(&node_folio_list, NODE_DATA(nid), true); + nr_reclaimed += reclaim_folio_list(&node_folio_list, NODE_DATA(nid)); memalloc_noreclaim_restore(noreclaim_flag); -- 2.39.2