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 EB0563D1713 for ; Mon, 27 Jul 2026 10:54:25 +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=1785149666; cv=none; b=ERlMz14PyDlnJjOFkCZp7+EbVGcfmki1Dtx1gfOkyuZ+lzsOu3+Yv/5kcT61BqjXkUAHPNAFQDJH3HyIH1TmD9OUgfgmVb6YaGHQ8cypc4Y14+k/3QkkuhA9iZ5xFRZnvScY8j5BxVyCui4v7fN83TNF2FkvZo9Rcn+uBkIXwtg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785149666; c=relaxed/simple; bh=Hefl8IqytYVDOgryYce2prMFVGcaRlij6qxx+oL2aGs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=pgDM2Qb065vZSqgnSi465oUcuk3m4idEu93HxmbsPquYHIwhEOBNXMdpTtl8PoqTGeLx7W978Wi99LPkF5eDXNV+ok59jRuifA4M8sqRScRVrVaDACepvnsfg0/hI6Vf5HjvsS9XTLkR6s+swXdGpWERf/FXWztnGk1HIb1gsA0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GCoB5Urq; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GCoB5Urq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 19CC01F000E9; Mon, 27 Jul 2026 10:54:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785149665; bh=uF4vHPdSBdfo7lQhDfOgMHZhCy1lSFDq/I/z2A8IyXo=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=GCoB5UrqSCFvUjKRygvutVMZhQhF9SV7CavFKIHlTE4iWj/ZSlruoQ7Mn9UBMUUM6 H/hC22g5iRyL/t7Pyhavb3b5sVkfID+08xwdx/At6uoz5JNVDC+Ol7SZh6/Elh2x+1 1KZ6vpySu1VWtIFlcyer0DyS+D+fcvk9bOe0J/5ck1fVPb/d2bcaGMrWLCslLobGnS O9ndtlEeOoNmrUIHTFZWmrcj4iCWLFsiLsEi/OxXd7HUhqW7S+R3MfWS4ABsyD4OEk oDuSFozpt7c9Qfm1j2FFxKAFOo9uczFSRsyJGfISBiSRm6oKSOw6jrDGJ1GPK0jUQ5 EBNZCnZA+ZCVA== Date: Mon, 27 Jul 2026 11:54:08 +0100 From: "Lorenzo Stoakes (ARM)" To: Nimrod Oren Cc: Zi Yan , Andrew Morton , David Hildenbrand , Baolin Wang , "Liam R. Howlett" , Nico Pache , Ryan Roberts , Dev Jain , Barry Song , Lance Yang , Usama Arif , Liu Song , Hao Peng , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] mm/khugepaged: cap pageblock contribution to min_free_kbytes Message-ID: References: <20260716173504.760369-1-noren@nvidia.com> <8E9B69B5-0FBA-4CE5-B737-B83AD1FE52C3@nvidia.com> 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-Disposition: inline In-Reply-To: On Mon, Jul 20, 2026 at 10:28:21AM +0300, Nimrod Oren wrote: > On 17/07/2026 17:58, Zi Yan wrote: > > On 17 Jul 2026, at 9:36, Lorenzo Stoakes (ARM) wrote: > >> Maybe a simpler version would be to just attack the issue we actually have > >> with it - it uses too much damn memory :) > >> > >> So maybe something like the attached? (you'd probably want to make this a > >> sysctl or at least a defined value of course) > > > > The approach below makes sense to me. In terms of the actual cap size, > > I asked Codex to check what possible pageblock_size and their reserved > > sizes: > > > > 1. 1MB pageblock size (s390) and 11MB per zone, > > 2. 2MB pageblock size and 22MB per zone, > > 3. 8MB pageblock size and 88MB per zone, > > 4. 16MB pageblock size and 176MB per zone, > > 5. 32MB pageblock size and 352MB per zone, > > 6. 128MB pageblock size and 1.375GB per zone, > > 7. 512MB pageblock size and 5.5GB per zone. > > > > 1GB makes sense to me. 512MB might also work. > > > > Assuming three eligible zones, my original proposal would have been > equivalent to a much lower cap of 66MB: > > 2MB * 11 pageblocks per zone * 3 zones = 66MB > > Using a more conservative value also sounds reasonable to me. > > >> General idea is - if we're going to cap, let's just cap instead of > >> pretending that page blocks are of a different size. > >> > > > > Sounds good to me. Thank you for the suggestion. > > > Thanks Lorenzo and Zi for the review. > Capping the final recommendation directly sounds good to me. OK, feel free to respin with that! A Suggested-by is fine for me. > > Cheers, Lorenzo