From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (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 61ABA20DE8; Mon, 5 Aug 2024 01:34:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=96.67.55.147 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722821662; cv=none; b=n3n/4rJ5gOi/ysCQehDXrQSB7C+Vvjn1bAW2EYV9Tj1xs9gNg9cUu7njLYC9kS3QICiuRowJ0VNhJl7ns1kYW4+c+4uxkNjWdxsHiDZe/Z6Kb17EWsZfs91aL0DOHFPiSbCJsJHbissib4HVkq9bnfPK6A7TzS7DpCzK8sLyfqg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722821662; c=relaxed/simple; bh=Wgr58nwnY0Mco7kjux8ii6T4Q4O2jfEhsYqBxsD9YpI=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=Lzdsv6pou/3hgt4AC/9F1A3xoaxT7kF2Rf1pyUoQbtDyYhN/B25Yw/uBRIPqvYbfhgC7rLa+l+X/1RvjY8KOOcdOx7RQSaunMuxI37oL9Vk1TicEtByiohvS7illc5i2X6CumjF2BzVQyKv/X5fZ3CeqJf0bdakL77QPMkA8wHI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=surriel.com; spf=pass smtp.mailfrom=shelob.surriel.com; arc=none smtp.client-ip=96.67.55.147 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=surriel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=shelob.surriel.com Received: from [2601:18c:9101:a8b6:6e0b:84ff:fee2:98bb] (helo=imladris.surriel.com) by shelob.surriel.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.97.1) (envelope-from ) id 1samao-000000000mQ-42LS; Sun, 04 Aug 2024 21:32:58 -0400 Message-ID: Subject: Re: [PATCH 0/6] mm: split underutilized THPs From: Rik van Riel To: Yu Zhao , David Hildenbrand Cc: Usama Arif , akpm@linux-foundation.org, linux-mm@kvack.org, hannes@cmpxchg.org, shakeel.butt@linux.dev, roman.gushchin@linux.dev, baohua@kernel.org, ryan.roberts@arm.com, rppt@kernel.org, willy@infradead.org, cerasuolodomenico@gmail.com, corbet@lwn.net, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, kernel-team@meta.com Date: Sun, 04 Aug 2024 21:32:57 -0400 In-Reply-To: References: <20240730125346.1580150-1-usamaarif642@gmail.com> Autocrypt: addr=riel@surriel.com; prefer-encrypt=mutual; keydata=mQENBFIt3aUBCADCK0LicyCYyMa0E1lodCDUBf6G+6C5UXKG1jEYwQu49cc/gUBTTk33Aeo2hjn4JinVaPF3zfZprnKMEGGv4dHvEOCPWiNhlz5RtqH3SKJllq2dpeMS9RqbMvDA36rlJIIo47Z/nl6IA8MDhSqyqdnTY8z7LnQHqq16jAqwo7Ll9qALXz4yG1ZdSCmo80VPetBZZPw7WMjo+1hByv/lvdFnLfiQ52tayuuC1r9x2qZ/SYWd2M4p/f5CLmvG9UcnkbYFsKWz8bwOBWKg1PQcaYHLx06sHGdYdIDaeVvkIfMFwAprSo5EFU+aes2VB2ZjugOTbkkW2aPSWTRsBhPHhV6dABEBAAG0HlJpayB2YW4gUmllbCA8cmllbEByZWRoYXQuY29tPokBHwQwAQIACQUCW5LcVgIdIAAKCRDOed6ShMTeg05SB/986ogEgdq4byrtaBQKFg5LWfd8e+h+QzLOg/T8mSS3dJzFXe5JBOfvYg7Bj47xXi9I5sM+I9Lu9+1XVb/r2rGJrU1DwA09TnmyFtK76bgMF0sBEh1ECILYNQTEIemzNFwOWLZZlEhZFRJsZyX+m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dGbkEc4pYZQO8UDXUN4S+pe0aTeTqlYw8rRHWF9TnvtpcNzZw== Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.4 (3.50.4-1.fc39) Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Sender: riel@surriel.com On Sun, 2024-08-04 at 15:54 -0600, Yu Zhao wrote: > On Thu, Aug 1, 2024 at 9:47=E2=80=AFAM David Hildenbrand > wrote: > >=20 > > On 01.08.24 08:09, Yu Zhao wrote: > > >=20 > > > =C2=A0 I would recommend shatter [1] instead of splitting so that > > > 1) whoever underutilized their THPs get punished for the > > > overhead; > > > 2) underutilized THPs are kept intact and can be reused by > > > others. > > >=20 > > > [1] > > > https://lore.kernel.org/20240229183436.4110845-3-yuzhao@google.com/ > > >=20 > >=20 > > Do you have any plans to upstream the shattering also during > > "ordinary" > > deferred splitting? >=20 > Yes, once we finish verifying it in our production. >=20 Shattering does seem like a nice improvement to the THP shrinker! However, given that the shattering code is still being verified, and the THP shrinker policy will no doubt need some tuning once more real world workloads get thrown at it, would it make sense to do those two things in parallel? We could move forward with the THP shrinker as-is today, and use the increased exposure it gets to fine tune the shrinking policy, and then move it over to using the shattering code once that is ready. Is there any good reason to serialize these two things? --=20 All Rights Reversed.