From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-186.mta1.migadu.com (out-186.mta1.migadu.com [95.215.58.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 157D22264A7 for ; Mon, 20 Jul 2026 02:33:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.186 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784514810; cv=none; b=PHfhFbyCWkyAm2G0WsIimwDEsngI5tqP54OnGJt2XsYA1E0M6iLDqKjiax/0UmAtqMVP5R2tPLJFlWGBL+9q/W20t3bvDY0jb8Fph0sxUs1pf8ytP1nUzkI5KKBVxdcrRO5iN90CMhtenaIXLqRwbVAXaFdClQ2u35qgM6Z7BEU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784514810; c=relaxed/simple; bh=PW3Sd+XCTPtYdNjH16ZU+jzU3AxxIUJvLVE4Aka739A=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=PWb5d9lyGIdlZXxbHH4FkPHXz/fNBjMjSeCigC9W3d57ZLdlVctCvKpQ8wd2gZwTd9bvUfWM0/DLQX/wGX23QjVf/5fGkk72sVxVihdZHiGvIwOS5CNBkAjEiwk/KcZaWhFnN1jiC46pCWSjDpA9lcP8IInDPEiN+xRHzxZSDBI= 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=dadKjXLz; arc=none smtp.client-ip=95.215.58.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="dadKjXLz" Message-ID: <19c17e7d-9331-4578-9557-2db5ee42ac69@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1784514806; 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=xFNn/gqLdYPzgx2CqKZ3opCnuLFj7YA6xkcjVFnjCJU=; b=dadKjXLz9ARZYgeTWO1Ey0wEdxocrEuhGm+HWa+PB3/86qMLmwpXiVfJNhcn8ONlMyhtwn 5ziqaFyV7w4D3VLu6lPvsV1i2pU31I7mCB2I1qoRcjjhNS8r81VRBT1ExNHjradc3x7yRy qjauOLXsh8OzFN0y7+prejGzEXhnyFA= Date: Mon, 20 Jul 2026 10:32:24 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH v2 2/4] mm: vmscan: propagate real error code from per-node proactive reclaim To: Ridong Chen , akpm@linux-foundation.org Cc: hannes@cmpxchg.org, david@kernel.org, mhocko@kernel.org, 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 References: <20260718095251.82937-1-ridong.chen@linux.dev> <20260718095251.82937-3-ridong.chen@linux.dev> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Qi Zheng In-Reply-To: <20260718095251.82937-3-ridong.chen@linux.dev> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 7/18/26 5:52 PM, Ridong Chen wrote: > From: Ridong Chen > > 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. > > [1] https://lore.kernel.org/all/20250717235604.2atyx2aobwowpge3@offworld/T/#m3514718be82a31b05726a49da9b61fbfc69a589e > > Fixes: b980077899ea ("mm: introduce per-node proactive reclaim interface") > Reviewed-by: Muchun Song > Acked-by: Johannes Weiner > Acked-by: Shakeel Butt > Signed-off-by: Ridong Chen > --- > mm/vmscan.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/vmscan.c b/mm/vmscan.c > index d6b383d96a0c..cfe4556c96d7 100644 > --- a/mm/vmscan.c > +++ b/mm/vmscan.c > @@ -8017,7 +8017,7 @@ static ssize_t reclaim_store(struct device *dev, > int ret, nid = dev->id; > > ret = user_proactive_reclaim((char *)buf, NULL, NODE_DATA(nid)); > - return ret ? -EAGAIN : count; > + return ret ? ret : count; > } > > static DEVICE_ATTR_WO(reclaim); Nice catch! Reviewed-by: Qi Zheng Thanks, Qi