From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-182.mta0.migadu.com (out-182.mta0.migadu.com [91.218.175.182]) (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 A2B46384CD1 for ; Sat, 11 Jul 2026 09:12:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783761144; cv=none; b=Sv+iBI7o65uuKmny9EBURLkbuSaqSJtTSk9ey2nUdK0QJcdfLPNTkaMRpQslcCV28uffrryGNLH5o0KxqWoJgG+A8SRagAKxTQX71ztTx+QZOZikoLZFiJDxgBGstY3XKQilzyokI/evCpO5RaKvWUD5LR3iXg968rf0ejBIntA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783761144; c=relaxed/simple; bh=4UpULPU5AwjYzbo+czoPlYDksnUC87jPPJYqWwfzsVI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=b789EkO4PtuC5uptmG99AqCN7HXORj4NXRI6dvUy89BgT9XhgLzQv7n/FBDQK8EEsZ2WDOK9HAR1cUMTk+IVIi41/PL+iUBicmsiuJK7rsVPAxA6S/jsEjsDPjC2kSNnt0Oi5YTLDFiNUwPF0mAKlH4rPcpzBkxLk9QZ1chaQmE= 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=gwX1St9y; arc=none smtp.client-ip=91.218.175.182 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="gwX1St9y" 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=1783761129; 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; bh=V0U6wuv8Iso5WD0+W0vrvXxkpcyPWjDPaBsrbVb3xvE=; b=gwX1St9yWookbKnJlLCfLdPMVyJcTPtp3PL/LemJy8e8plxTihXSlOHVQ4hpbGJKZNwNhA 90GBmQcxmCfOkixN6YPRgwdIfiRWOdXfIqw5qjPPk1r6MBKih3LJk2SKZV9gMxnh2NGKoA s+MM0hUy2/hW2BhTobpo+Yi1eN6sAzw= From: Ridong Chen To: Andrew Morton , Johannes Weiner , Michal Hocko , Roman Gushchin , Shakeel Butt , Muchun Song , Chris Li , Kairui Song , David Hildenbrand , Barry Song , Yuanchu Xie Cc: linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, ridong.chen@linux.dev, Ridong Chen Subject: [PATCH 0/2] mm: fix node reclaim swappiness handling Date: Sat, 11 Jul 2026 17:11:55 +0800 Message-ID: <20260711091157.306070-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 The per-node proactive reclaim interface (/sys/devices/system/node/nodeX/reclaim) accepts a swappiness parameter, but it was silently ignored when CONFIG_MEMCG is disabled. The root cause is that sc_swappiness() had separate implementations for CONFIG_MEMCG and !CONFIG_MEMCG, and the latter never checked proactive_swappiness. Patch 1 moves mem_cgroup_swappiness() from swap.h to memcontrol.h and makes it handle both CONFIG_MEMCG and !CONFIG_MEMCG cases in a single inline function. This is a prerequisite for unifying sc_swappiness(). Patch 2 consolidates sc_swappiness() into a single definition that works regardless of CONFIG_MEMCG, fixing the node reclaim swappiness bug. Ridong Chen (2): memcg: move mem_cgroup_swappiness to memcontrol.h mm: vmscan: fix node reclaim ignoring swappiness parameter include/linux/memcontrol.h | 25 +++++++++++++++++++++++-- include/linux/swap.h | 19 ------------------- mm/memcontrol.c | 3 +-- mm/vmscan.c | 17 +++++++---------- 4 files changed, 31 insertions(+), 33 deletions(-) -- 2.43.0