From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-183.mta1.migadu.com (out-183.mta1.migadu.com [95.215.58.183]) (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 E8C8E377A88 for ; Fri, 24 Jul 2026 03:35:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.183 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784864148; cv=none; b=uHwFH8cjJEoIr+x/rzgf1C3TrX4TBTCVYzNXjzdPlcHoR/XpqWoU6v9+Bo60ZlVPmFAj7h3s4Mj8EdBh4R06iYvJX8NKvr7c7TjXH4g8N3TA+o9X8fQgj1CtbYqvpTgdlLPyNOsY1QM25slUUVVOQsApAt8Me25iCYjJq167wzE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784864148; c=relaxed/simple; bh=54sAy2sJKVv+DV6jvU2/V+KJvNRbfDAZ3Do8FJzl+OE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=FFoh15eRnOMeclzToycihz0JCuJ171ZDgTY1YDon7R248LsQPGKzRgFtza7ItkacCk4wxOf3sGppMv/ca3dYxNu7kE9FL6iVtl/GEEVYJrA+quOvyhWfqRvLHKQLG6+vwrYE+Nyn7GmVfOmGWfNzalgjR8oEHU6Uw3bkbtUmkPY= 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=BanKC+Pq; arc=none smtp.client-ip=95.215.58.183 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="BanKC+Pq" 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=1784864144; 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=BanKC+PqDq/UEYb+NLt7HcTTQ6xc3q/hMkAk4LlCZM8vPAfzMNG+xRbgukojZHo3bY+tzL E4IrWHxA/IiHH2IqB+L0Pd4Yv+1+MisNpEVAbVifAfKEo7WGhED8RdnuyhouLrZVOkij7T vbOOy+0Y7J5nkEhHDNz78N2QlegKQP0= 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 -v4 3/4] mm: vmscan: drop unused gfp_mask parameter from __node_reclaim() Date: Fri, 24 Jul 2026 11:34:34 +0800 Message-Id: <20260724033435.2573323-4-ridong.chen@linux.dev> In-Reply-To: <20260724033435.2573323-1-ridong.chen@linux.dev> References: <20260724033435.2573323-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