From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-176.mta1.migadu.com (out-176.mta1.migadu.com [95.215.58.176]) (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 BAAD337BE8E for ; Sat, 18 Jul 2026 09:54:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784368470; cv=none; b=hn8tPzoz0cOuaaxGq8LSlR/DzyATgdxOj3W47o4F9xszSWDS5Ads2a2LD05xadDJubFvY+rhznH75tEl57PK5hqBDkm+AnWMw3vTM00TFXhKRMGH7rhvJR1OjX3gE2lnDGvpN5F90/xC0zkvnBNkBsFeioswoHcpnlFsAW71c/k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784368470; c=relaxed/simple; bh=Q89afdI9RUszeuTd+0bZGUDh9p9GYJPameUrjlT++nA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tK/SFdIi3czlQXIm0is0iJaOfG+nzgGlDS24XAgWumW52octTNGsaDx67wcQx0UgwKH0wd7/SEPGwnupb9qqRkZoSCye7NA3A3jFhyNWeK6v1AC9swPncfoOWw6xzN+lnAQbKjh+PK674Px1PiuHTDrdSTaMQU8lSFGhKBjZkv8= 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=SWJHGvIJ; arc=none smtp.client-ip=95.215.58.176 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="SWJHGvIJ" 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=1784368466; 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=jfS0xqNab+cGTBtcs71EybfPlueNPDuy0c1ubwCt214=; b=SWJHGvIJ9H9I0bqGkmj23ibjJvqGqlNWOEBHhA4KnGBBPZvA3QtZ8Nz1wb1lGiPDUJkbfH 36CyERNXQ6ER0t4rfRLfvQXJNonVLbbMSICCymcfge+4PV2bJOjAh1c/UYcvxOrKo4GXkA uF/gu3WcHWS+QWfbjXJmFmK9+ZMHyjI= From: Ridong Chen To: akpm@linux-foundation.org Cc: hannes@cmpxchg.org, david@kernel.org, mhocko@kernel.org, qi.zheng@linux.dev, shakeel.butt@linux.dev, ljs@kernel.org, kasong@tencent.com, baohua@kernel.org, axelrasmussen@google.com, yuanchu@google.com, weixugc@google.com, hezhongkun.hzk@bytedance.com, muchun.song@linux.dev, dave@stgolabs.net, roman.gushchin@linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org, ridong.chen@linux.dev, Ridong Chen Subject: [PATCH v2 3/4] mm: vmscan: drop unused gfp_mask parameter from __node_reclaim() Date: Sat, 18 Jul 2026 17:52:50 +0800 Message-ID: <20260718095251.82937-4-ridong.chen@linux.dev> In-Reply-To: <20260718095251.82937-1-ridong.chen@linux.dev> References: <20260718095251.82937-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 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 cfe4556c96d7..e1ef6350a300 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -7742,7 +7742,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) { @@ -7834,7 +7834,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) @@ -7847,7 +7847,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) { @@ -7949,8 +7949,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.43.0