Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794488032; b=hdibrYKakVKH6RC8DvQxNgMQuqsRIYplg41s+ESHL067jZHA/FXq2bUwDSjF/8owIdhR ninWrQ+nOONLhzjSkxmIGlu35jWDAjy0H3dxGGCGBFLFs5BrhooOStrWeEYFT7fYBoEDr RZPrJARx23XMoZhSQb7d0alg5R0VdIw/JnumNg+mfG62HMXopVSVKzz2X62fChIQGWwnR iI4YhQYTJTLFUbGu74BXuEs8wEefyCqWJJRuy0OROKSJOFFv+UL03Anf+/gHs4rIW5y6o f0Je8kKB6Bn4xP1ScHH3O7PWppGooEl4olV0xED+s/62LhOvoJ3VBe29stX27nBXaQg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794488032; h=Received:DKIM-Signature:Received:Received:X-ME-Sender:X-ME-Received: X-ME-Proxy-Cause:X-ME-Proxy:Feedback-ID:Received:Date:From:To:Cc: Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; bh=5ZrUjxQ1X/We7wtRHupxrDAx8TTm7+SwxqIT1sIDYs8=; b=IDTHcfXyJn4x3/ynhPdpT9Yrl8332QpVloIiwk96bsPg5/67NaugZ1jCqi/klQC7os+C 1HI3uEnfEJ5uKPAhn/JRj/mVm89EeRnbyQuhI00K/lRegTfj6aU7/p8eY7sjhH4/mGWVo Wkuf4Qc/5Ipd5DAl7+k8bODTjVDs1D/pJPw4TQL29lrNcJXiqqL+dp822JIk53HOwgBml BHmKfO+Jx12GN9K3cys2/UUxwpKphCCNf04NL3fgS7ZoSbzdjAqz4GsJvkomKBRheg/C4 3nj9loPwjEhCV6TxhEMmlcl6rz1Pdaa2w4UhEWuIJGeSLdETdESfwDoIcKdZ5T5FzkA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="KlsD5/fD"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A3300606A323 for ; Thu, 12 Nov 2026 12:53:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=KlsD5/fD Received: by smtp.kernel.org (Postfix) with ESMTPSA id 282D71F00A05; Thu, 12 Nov 2026 12:53:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794488032; bh=5ZrUjxQ1X/We7wtRHupxrDAx8TTm7+SwxqIT1sIDYs8=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=KlsD5/fDIsqfPCfdiKHytK35h7uvYxYrUze6fdg/0xfS5GdIy3Qdzwoiqxsy6TQxk PvSsHrdDooxG757ynturfT5Jp1GjoYPdtswhj5LJWDhkWNIJyzyTFWIdMG87sY5HbE M4m0dLpdvTw7srV/Tj4KVPWwO3EAu8GLt0g38v0RjbNi/pzaQWmIkk57ti0M0ZRCX/ TJLMaw0UQDju14m48deW5o8bwmTU5r8cfHd+WTc6V9CxgzEqzEzAJCWscmUIcN4+TF Li9oK0AJPGWj5sj9x84090j2rjFGMTn6PWIglFkoUaGPiFAcLxKgnhEOXmEu3KNsQo PQsO02yU03ADg== Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfauth.ams.internal (Postfix) with ESMTP id 5EEB51980047; Thu, 12 Nov 2026 07:53:41 -0500 (EST) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Thu, 12 Nov 2026 07:53:48 -0500 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTGpc2ngwwYoKY78wwM9oTdiUFMdbNknNo/bzCD9ox6CwBy3Bae6ac3Pn2KNSG69io DjjSRQA+ArMHIJlqqToeBv2DuKjHaexSBKpjRpEneCf/9m7ijFudy4tMLdJCDVAS88IZxT ljujfxRBPh/0Qww/nQXmrETum1Cv87lC/wq6AdyCL5zA21NYdJmNBPjvIaFGQYxP35tRSJ twxmmrXTtBDACJ+v/NMff8Ez7le0JwbqH0qPmrmF0AY2K5IAL9jbb5ji+sFi+IZvYTKKpx zx98PLZAbI70f9z8nSTz/ir5t8tP8METbjMjfP3rgKtV/F4AeqoyEA12VrelbA92HmNwOZ CN4WcOOMGdlBMYv+tIShCcVMbXgLI9FUUOcLxCfkG+VYluTwDKMLamFXmV6TVl4u1Qhbco +jMi2PoHmBpKwD7Jg5LQa9R3aT4xxrRvXo9PDh4HSvq/QKEJneRRCCN78AXBKQuQysNSMe uxj6c+RTR4+wEuvLnXrbXNAk7rxkIi8ORKAq4MDa5dfN5RsAUdLvr10rxV6IDFsWcyJPb7 VfsIuBEsJ0Yljqod7sr1P9kFBYHd+sl+NzWhPsaMMTek1s5yD5hX0US8QTepnvYqzX3IWz ob3uAdU9lh/SDU/vM7t2Ngo2ShIZ0DHmL+ghORCbgdu3QNhRGsC5YdMsyFQg X-ME-Proxy: Feedback-ID: i10464835:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 12 Nov 2026 07:53:40 -0500 (EST) Date: Thu, 12 Nov 2026 12:53:39 +0000 From: Kiryl Shutsemau To: sashiko-reviews@lists.linux.dev Cc: Andrew Morton , Linus Torvalds , David Hildenbrand , Matthew Wilcox , Vlastimil Babka , Lorenzo Stoakes , Jan Kara , Hugh Dickins , Christian Brauner , Alexander Viro , Harry Yoo , Miklos Szeredi , Miaohe Lin , Naoya Horiguchi , Oscar Salvador , "Liam R. Howlett" , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Brendan Jackman , Johannes Weiner , Zi Yan , Baolin Wang , Nico Pache , Ryan Roberts , Dev Jain , Barry Song , Lance Yang , Usama Arif , Kairui Song , Qi Zheng , Shakeel Butt , Axel Rasmussen , Yuanchu Xie , Wei Xu , Baoquan He , "Paul E. McKenney" , Pedro Falcato , Luis Chamberlain , Ilya Gladyshev , Jaegeuk Kim , linux-mm@kvack.org, kernel-team@meta.com Subject: Re: [RFC PATCH v2 06/18] mm: free the pages waiting for a grace period before OOM Message-ID: References: <20261104130118.2507513-1-kas@kernel.org> <20261104130118.2507513-7-kas@kernel.org> X-Mailing-List: sashiko-reviews@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Nov 05, 2026 at 01:03:34PM +0000, sashiko-bot@kernel.org wrote: > Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider: > - [High] mm: order-0 check in rcu_free_wait() starves high-order compaction > - [High] mm: rcu_free_drain() misses rcu_free_workfn() and PCP-freed pages > - [Medium] mm: rcu_free_wait() counts unreclaimable pages after retry limit All three are valid. In v3 the drain moves out of should_reclaim_retry(). It runs after the compaction retries, before defrag_mode drops ALLOC_NOFRAGMENT and before the OOM killer. Reclaim has given up by then, so reclaimable pages are no longer counted. An allocation drains at most MAX_RECLAIM_RETRIES times. The drain also waits for rcu_free_workfn() and drains the per-cpu lists the works free to. -- Kiryl Shutsemau / Kirill A. Shutemov