From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-186.mta0.migadu.com (out-186.mta0.migadu.com [91.218.175.186]) (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 741C139CCE9 for ; Thu, 23 Jul 2026 04:58:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.186 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784782700; cv=none; b=EeZubNJlK9yyZGhOJwZH/JuCKbnuy8j38E46wD5V/hqAxqm6B6Nw/t0UdKbRRknxOaT0ms1kFmHFKgaLNjN7SpXA47GqRs3larVAQcFaHI3JywEtDPJdDT92aokIb1aqRfG7/NOh0rhotWj1m0QEFMGeD/HOFW2BAuIY4Ue20Oo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784782700; c=relaxed/simple; bh=54sAy2sJKVv+DV6jvU2/V+KJvNRbfDAZ3Do8FJzl+OE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=nibYL4b0J+gfUxZ94s2F+IUQwHTtzakSWEiNN+W/E6Gaqv/Q5xlQI3NpA8BJI072fkMkjoLM8Dk5h09gtIQNQc+Tl16scRNSzbENmtjgRrgmrET8zJDX4otjJORrBEk8MbFjR+3hpa/gLdWLLQIYd6vVXgQyoBXFr7gb++OXWhA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=KmCcYRhu; arc=none smtp.client-ip=91.218.175.186 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="KmCcYRhu" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1784782684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=prRkJ8J9CasuULDtKNoROjKzd5fvtcvvTAb4zEJwJM4=; b=KmCcYRhu5anAL/i/DX+v0R13XjAs/VaCS4vCeyb8Azi3l4pPu79amO/blrjC9wBfZXozpK kqExUkwMVYAJub9MC9wIPSjENjY0EYPJwQ+sG3C1ODonhgLFznY23i/IJ+gFoQSAVNjY0B mnL00RCS7jFQoHjgYudO/BhyJNiirvs= From: Ridong To: Andrew Morton , Johannes Weiner Cc: David Hildenbrand , Michal Hocko , Qi Zheng , Shakeel Butt , Lorenzo Stoakes , Kairui Song , Barry Song , Axel Rasmussen , Yuanchu Xie , Wei Xu , Zhongkun He , Muchun Song , Davidlohr Bueso , Roman Gushchin , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Ridong Chen , Ridong Chen Subject: [PATCH v3 3/4] mm: vmscan: drop unused gfp_mask parameter from __node_reclaim() Date: Thu, 23 Jul 2026 12:57:17 +0800 Message-Id: <20260723045718.2052070-4-ridong.chen@linux.dev> In-Reply-To: <20260723045718.2052070-1-ridong.chen@linux.dev> References: <20260723045718.2052070-1-ridong.chen@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT From: Ridong Chen Commit 57972c78e678 ("mm/vmscan: make __node_reclaim() more generic") moved the scan_control construction out to the callers and passed the struct in by pointer. After that change every use of the gfp mask inside __node_reclaim() goes through sc->gfp_mask, leaving the gfp_mask parameter unused. Just remove the dead parameter and update the callers accordingly. No functional change. Acked-by: Shakeel Butt Acked-by: Johannes Weiner Reviewed-by: Muchun Song Reviewed-by: Barry Song Reviewed-by: Qi Zheng Signed-off-by: Ridong Chen --- mm/vmscan.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 4b62d6304c49..859655fcf60d 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -7748,7 +7748,7 @@ static unsigned long node_pagecache_reclaimable(struct pglist_data *pgdat) /* * Try to free up some pages from this node through reclaim. */ -static unsigned long __node_reclaim(struct pglist_data *pgdat, gfp_t gfp_mask, +static unsigned long __node_reclaim(struct pglist_data *pgdat, unsigned long nr_pages, struct scan_control *sc) { @@ -7840,7 +7840,7 @@ int node_reclaim(struct pglist_data *pgdat, gfp_t gfp_mask, unsigned int order) if (test_and_set_bit_lock(PGDAT_RECLAIM_LOCKED, &pgdat->flags)) return NODE_RECLAIM_NOSCAN; - ret = __node_reclaim(pgdat, gfp_mask, nr_pages, &sc) >= nr_pages; + ret = __node_reclaim(pgdat, nr_pages, &sc) >= nr_pages; clear_bit_unlock(PGDAT_RECLAIM_LOCKED, &pgdat->flags); if (ret) @@ -7853,7 +7853,7 @@ int node_reclaim(struct pglist_data *pgdat, gfp_t gfp_mask, unsigned int order) #else -static unsigned long __node_reclaim(struct pglist_data *pgdat, gfp_t gfp_mask, +static unsigned long __node_reclaim(struct pglist_data *pgdat, unsigned long nr_pages, struct scan_control *sc) { @@ -7955,8 +7955,7 @@ int user_proactive_reclaim(char *buf, &pgdat->flags)) return -EBUSY; - reclaimed = __node_reclaim(pgdat, gfp_mask, - batch_size, &sc); + reclaimed = __node_reclaim(pgdat, batch_size, &sc); clear_bit_unlock(PGDAT_RECLAIM_LOCKED, &pgdat->flags); } -- 2.34.1