From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-185.mta0.migadu.com (out-185.mta0.migadu.com [91.218.175.185]) (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 09CD33998B1 for ; Fri, 17 Jul 2026 13:01:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.185 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784293280; cv=none; b=p0hTIExHp5OYH3jFcsGkrsJWvlGZkCNma3hd+30j6Gq1a1ZbVBA20Fi7GOK3X8CnCHw0E+aMv9Qc3Bf8mOEa6YMKOcxgztv2IGbdBenreRlcBFnhXAqToRYyBCvOgHwfO84cxgjT/xPV0wLBpt3rE2hB4zUD6omvMHnD5Bz8G6g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784293280; c=relaxed/simple; bh=cL3Iq6fwDlT+FNreFDHU8uZZPVeGm49v9Pr7XAeljas=; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc: Message-Id:References:To; b=F5UYGNqtCY7ESXxigcfNAmGZM5Q0dcw11fpFchOoiWGl8aMsZ4/cI0XUiI23D5ZpMR3JLLxd8pieZHvXFMi6g5h8nl3RQ0iIjSvE7Hshotq7IXWiOV8YVxG+scztT6Ih3Egegk0V2zSW1hg72racGx8DjfWvJvvMwKCp3JWeoCQ= 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=u7N+cSjt; arc=none smtp.client-ip=91.218.175.185 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="u7N+cSjt" Content-Type: text/plain; charset=us-ascii DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1784293272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NkRtaxIvvKiWEV0ZWEBRBIB4kkHOi/FZGBNGbsUGNPk=; b=u7N+cSjtImlVXVB3sZAZxx/iYbUvW2uwzlYMNoyUBFiaNcEym09gzy92SRUOwe2JL3ICd0 jjGDlvZjwsOXPh1OU3wiWm4mXk40W6HcR+F7Npqt6PmSA2oJElotH88qFppTnIV2gtBxVp z1y1r1yFunI6I1eMU7K45+EbIjl/VZo= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.600.51.1.1\)) Subject: Re: [PATCH 2/3] mm: vmscan: propagate real error code from per-node proactive reclaim X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Muchun Song In-Reply-To: <20260717113300.214717-3-ridong.chen@linux.dev> Date: Fri, 17 Jul 2026 21:00:11 +0800 Cc: Andrew Morton , Johannes Weiner , Kairui Song , Qi Zheng , Shakeel Butt , Barry Song , Axel Rasmussen , Yuanchu Xie , Wei Xu , David Hildenbrand , Michal Hocko , Lorenzo Stoakes , Zhongkun He , Davidlohr Bueso , Roman Gushchin , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Ridong Chen Content-Transfer-Encoding: quoted-printable Message-Id: <6A57CFBD-51E2-41ED-82F8-9B6DDBB5FF36@linux.dev> References: <20260717113300.214717-1-ridong.chen@linux.dev> <20260717113300.214717-3-ridong.chen@linux.dev> To: Ridong X-Migadu-Flow: FLOW_OUT > On Jul 17, 2026, at 19:32, Ridong wrote: >=20 > From: Ridong Chen >=20 > It has been observed that per-node proactive reclaim always returns > -EAGAIN when any error occurs. As discussed in the mailing list [1], > the interface should distinguish between cases where no reclaimable > memory is left and where another entity is concurrently using the > same interface. Propagate the real error code, consistent with how > memcg proactive reclaim handles errors. >=20 > [1] = https://lore.kernel.org/all/20250717235604.2atyx2aobwowpge3@offworld/T/#m3= 514718be82a31b05726a49da9b61fbfc69a589e >=20 > Fixes: b980077899ea ("mm: introduce per-node proactive reclaim = interface") > Signed-off-by: Ridong Chen Reviewed-by: Muchun Song > --- > mm/vmscan.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/mm/vmscan.c b/mm/vmscan.c > index 098adc599720..45fbbefe0906 100644 > --- a/mm/vmscan.c > +++ b/mm/vmscan.c > @@ -8008,7 +8008,7 @@ static ssize_t reclaim_store(struct device *dev, > int ret, nid =3D dev->id; >=20 > ret =3D user_proactive_reclaim((char *)buf, NULL, NODE_DATA(nid)); > - return ret ? -EAGAIN : count; > + return ret ? ret : count; I usually use "? :" to omit ret. Just to be clear, I'm only sharing this as a personal preference. I'm not suggesting that you actually need to = change it. > } >=20 > static DEVICE_ATTR_WO(reclaim); > --=20 > 2.34.1 >=20