From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4773F2DA75C for ; Mon, 13 Jul 2026 12:55:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783947352; cv=none; b=sPFQdg7I7zX53YR/JT1lrB5lJyLDP9WHRZnSR5WQztO7eke7MuazdVI3U2CnVuv7xn9U4FuiG85sQ3UWPL0NOjb1ZDMhqCvE7c+7yPyb14jiwRVueLwznE3WyHBGweKRmXdR23jR6+niXsMJHf0MSDSXuWayPZZg9g3sYQ+vHeU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783947352; c=relaxed/simple; bh=bY380AWNQSlOibS/srY3yyaxsq2HvIperV8l0Vu7xhw=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=GY29MtUfeNf4W2MK3eHXWLiyf+20lZtTwn6wZlieMHMrLpJzIKztQPFSucd2BT+Wufee7e9lMWXcjFwGf0JhfVIk82LNMD0dR1NRhKGSQSTCCI/2B9nkLmA2uqGRZ2GZBYiYnpHCkGsxbUbSCtfkDgurDL8UrntOP7kdQYQoXOE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=WbOgfDNg; arc=none smtp.client-ip=209.85.128.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="WbOgfDNg" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-493c564ed4dso2115085e9.3 for ; Mon, 13 Jul 2026 05:55:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1783947349; x=1784552149; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=bY380AWNQSlOibS/srY3yyaxsq2HvIperV8l0Vu7xhw=; b=WbOgfDNgXIpJXt0789ECS18VG4YuP3pXnzJnY5Hhnhyp6bwd+KdP1U3YSmNu88EBSf /TV7t6hG9E/sxOL1hWDFtfXx/51k29E6cgCfZcf1qnegXoHjg5A6tg0QqlKs0cr26/PB Gr2fknGpH6lKP5yhRex/9BaT2d6zs5Pi2Yh5cXs5ehpqKTnqBVn1Ln0ineC7SkIl7Eo1 29NMQI/YZa+Ugo75luAsc4alCdTnE8Y+TK5MdEQCTRixSr6QUpex9mx9/DDX3YYqdZok dARpFdJlypNGjaqm2eZO9OXIe/xQ0vAV+BnLw9ObGsa+pHqVe1ia5xfHZiJKXJVQ4G7t ZYVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783947349; x=1784552149; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=bY380AWNQSlOibS/srY3yyaxsq2HvIperV8l0Vu7xhw=; b=rcrqheOHRjmVNyRUP3TmLXTUEEqLpc7nL8kAKSvSH0z857iM/xrcoRoi1vRZOJjuI7 5cGUZyKL+5tvwJkQ/+toj2gOgpeiTMZjbSgSTrFeGtoCaY39iWMv+VeXNjhknQs1sKkc zwXpdcS/TbkYcOez8B4mW7YidxxumFHYp2Hn3no5sr5WS21NClvAY6F4gStbClXzTsM6 33u3xP5jzOKEd42JVPG+2BRpDl5vLT9l8kQPR/brRk4D7tNWcNwxgsZ02hfvrOytUMps Z6Dc3isVnpw5AxvlJG1C7wXZlZEJJwneq9MdpYlOcp/oMo0Tl5xjwXSUx4L4jDRu6wIJ ez9w== X-Forwarded-Encrypted: i=1; AHgh+RrHGYntJbO2d9Q+4Y/IbrtPLqsz+w44kpcXbGUw6WJqZbDcBrZkBtYJd467/xHyWdyIz6W+U4fNNb69h6s=@vger.kernel.org X-Gm-Message-State: AOJu0YzRr6CcKh5lifv3DSNZjUlVMVtnPDBSR30ljI6mFyA2xslKcbvd KZknHkmJ1uMtsliTtXIQPEs0eNmKhfI0PEiUrrA11I/XPKPPKgcGPtPdoXK42oTJTZ4= X-Gm-Gg: AfdE7cnfDmZeJNSBQ7qGXRHejbMDoudU90xRHiHhB2+vbTNjc4lGE9LjV0zQ+BvlPQW 9/iTNZipTMft2zOQ3v3+UHlGVwAoOBQ024IIVdxmRxUoB1KY1ENYSYPp+hHHB19OXxeIXqUVl4G 5ZeMpSo3MC/glZPELt53VQSTvGLdsHWuqhQsh4MkzndmWecPnSlB12QkUNEq5e+J5TifgsCKrM3 UybJRbbrui4xbTrIeq9SEEZMgUX01kZsd9csuE40CM5bxfe58pn47OdgscvQCS1bBXii/+J7q94 al1f5hJw9y8mh13+styBNyr4X2JZAM2mLUxJPNqOABIgaW+TOdQ1S0OV+pHYJFcl3RMTeU/Gahq ltcFX0KSIge8hhoEACoYQwd8hhmWCS3WTsKpZ+MfCgo0yuQYC0fmVQOEr+yhd6S4eftYmoIaxiQ GZQarbJ9YDrj/NHdUkzObBgAg2A5fhiAlFK9AxhKxCxhLnpD94Dp3+kwLmE+5J+RomQujTF6FH3 eR1cA== X-Received: by 2002:a05:600c:3e1b:b0:493:bd67:315 with SMTP id 5b1f17b1804b1-493f882fb12mr60707365e9.5.1783947348558; Mon, 13 Jul 2026 05:55:48 -0700 (PDT) Received: from mordecai (dynamic-2a00-1028-83b8-1e7a-3010-3bd6-8521-caf1.ipv6.o2.cz. [2a00:1028:83b8:1e7a:3010:3bd6:8521:caf1]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-493eb6ff6casm431976995e9.5.2026.07.13.05.55.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 05:55:48 -0700 (PDT) Date: Mon, 13 Jul 2026 14:55:45 +0200 From: Petr Tesarik To: Johannes Weiner Cc: Andrew Morton , David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , linux-mm@kvack.org, Brendan Jackman , 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: <20260713145545.1ff1136b@mordecai> In-Reply-To: <20260713110443.GD276793@cmpxchg.org> References: <20260710152320.2024283-1-ptesarik@suse.com> <20260713110443.GD276793@cmpxchg.org> X-Mailer: Claws Mail 4.4.0 (GTK 3.24.52; x86_64-suse-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=UTF-8 Content-Transfer-Encoding: quoted-printable V Mon, 13 Jul 2026 07:04:43 -0400 Johannes Weiner naps=C3=A1no: > On Fri, Jul 10, 2026 at 05:23:20PM +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. > >=20 > > Therefore, node_reclaim() can simply return the number of pages that ha= ve > > been reclaimed, same as __node_reclaim(), and the NODE_RECLAIM_xxx macr= os > > can be removed. > >=20 > > There is one small change of behavior when __node_reclaim() was attempt= ed > > but returned zero. The allocation now skips the zone immediately; before > > this patch, the zone watermarks were checked first. I believe it was an > > oversight rather than intention, because the chances that zone watermar= k is > > OK after __node_reclaim() did not reclaim any pages are very close to z= ero. > >=20 > > Originally, I was looking for occurences of NODE_RECLAIM_SOME and > > NODE_RECLAIM_SUCCESS, but I couldn't find any. That's because they are > > typecast from the result of a relational operator. This seemed a bit > > fragile, so I dug a bit deeper and came up with this proposed cleanup. > >=20 > > Signed-off-by: Petr Tesarik =20 >=20 > Looks good to me, and agree with the minor change in behavior being > acceptable. With the macros actually removed, Uh-oh, I missed that hunk when rebasing, and of course, there's no compiler warning about unused macros. :-( > Acked-by: Johannes Weiner Thank you. Shall I resubmit once more to include the hunk that removes the macros from mm/internal.h? Petr T