From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 6B0173BBA0B for ; Fri, 10 Jul 2026 23:27:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783726051; cv=none; b=d2pUX6StLfAcIOa3S/sSg2jxyhiB62rTdUGsoeE0XbqVzXKI6bvIhv9o31gQKw87PCjMVw1VSFsB/QwNwcTsMc4XfyxG0m6v/IGvvI0GK/PtwV02nhGRMOVJfwbx6dKTI6ap+HkmwaVBsaLGTKaZiTwGzLuAUoEiwqH8GTYUTRc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783726051; c=relaxed/simple; bh=BB3mpOrp0TZX9iMyDoTlLnSxCFqnJUhMO7xuKAmUTnk=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=AabvUwPo7UgVPfQcrd4eABxiaLYx4H2rtGlrVLMu4ADkvMM33umfjZAVkUR9jELcdbql/KhjJQ+fDYeg/C0Pd7jeuMXIaQb4dAn+jKOK5IvIBpTVVqMJOmBS8vX3S8KghyPRgjQpxZ2Tg+HZiWdEFYW21f1ANffybxNTk+q2ROI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=Atl/XXzr; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="Atl/XXzr" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BD63C1F000E9; Fri, 10 Jul 2026 23:27:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=korg; t=1783726050; bh=WW3ZS6ffce0sFRQ3Pe5X7FcCWqUZEchChIpBrhH1dk4=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=Atl/XXzr294k8x5ztlMu+IFnzM/22TJJazOY92sXMG0+TnASZdphKkHjgJg2yzedF NooFvYwx5HXEcqz86HfeKdptMe9FrfbWysVhYdQGCYLr4TAWA/1D5TXbkdrWfo/qYN Dr0dZhI+jkbGU+0HhWw+kqBEIX6qtVldq83H7GtA= Date: Fri, 10 Jul 2026 16:27:29 -0700 From: Andrew Morton To: Petr Tesarik Cc: David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , linux-mm@kvack.org, Brendan Jackman , Johannes Weiner , Zi Yan , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/1] mm: let node_reclaim() return the number of pages reclaimed Message-Id: <20260710162729.b340eac3c83d4c3e0369558b@linux-foundation.org> In-Reply-To: <20260710152320.2024283-1-ptesarik@suse.com> References: <20260710152320.2024283-1-ptesarik@suse.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 10 Jul 2026 17:23:20 +0200 Petr Tesarik wrote: > There is only one caller, get_page_from_freelist(), and it does not make > any use of the reason for skipping the reclaim, nor does it make any > distinction between a full and partially successful reclaim. > > Therefore, node_reclaim() can simply return the number of pages that have > been reclaimed, same as __node_reclaim(), and the NODE_RECLAIM_xxx macros > can be removed. AI review (https://sashiko.dev/#/patchset/20260710152320.2024283-1-ptesarik@suse.com) points out that the macros weren't actually removed. Perhaps you meant "use of the macros can be removed" or similar. But it does seem they can indeed be removed: hp2:/usr/src/25> grep NODE_RECLAIM_ mm/*.[ch] include/linux/*.h mm/internal.h:#define NODE_RECLAIM_NOSCAN -2 mm/internal.h:#define NODE_RECLAIM_FULL -1 mm/internal.h:#define NODE_RECLAIM_SOME 0 mm/internal.h:#define NODE_RECLAIM_SUCCESS 1 mm/vmscan.c:#define NODE_RECLAIM_PRIORITY 4 mm/vmscan.c: .priority = NODE_RECLAIM_PRIORITY, (NODE_RECLAIM_PRIORITY looks like it belongs, but it's an unrelated thing). Let's not do an immediate resend to address this please - let's give reviewers a week or so to do their thing.