Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3140370rwe; Mon, 29 Aug 2022 06:34:05 -0700 (PDT) X-Google-Smtp-Source: AA6agR4LClfaYKBvMhr5dIo4xBHYSlrFHLM2uHzwEOfavc1U8wa7K1n7NwCqxhg0q731m66B5Cgg X-Received: by 2002:a17:902:db0d:b0:172:925f:3c78 with SMTP id m13-20020a170902db0d00b00172925f3c78mr16356016plx.157.1661780044898; Mon, 29 Aug 2022 06:34:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661780044; cv=none; d=google.com; s=arc-20160816; b=OTGRhEmJH5sn18qmlZkfZX/q75t+4P5UUUQioygfPBLsg+QxRbINaa+8m0X7QqX+nG 8Z6o2V5GE22f8FUIi8zVR+DCSdm3g0AAw5W0S3y5qtI5qYbd8jtWSKlwvIR7KjJEA2MR tLZA9Wr2mtwztkmgbOMwNBtnIgo37TpWxHRsx3eAp5ul+kSXIVmWYsAjgX7afzOz+lvm Ej40nKwPx//XMK6Qyc+ET0vPrnOyV64Ez+O126ALS6rXmEaPdO2WPP3Uujh4on1JU/++ r4rO8OnX1E4F1DSE8jtXUo5ChAvcyr735Ow4y8+ojEzSH89Jkr2Va2IQT9yYGH9n2uKH 006g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id; bh=muqsqjyJYUzuCdm0ead/h7ItR751OUKZevReqCg6Tpo=; b=WH40ul81Ji/AVMhmSPBDlWc7FB5rWv3g7uFp1QF8jPFlGQT+4c65mkVAOBeI9QJuvC peSN3N7webbh9ZcOlxh3lIGbsbOorIiLz2wfJGYnz7HNow9QDCwoNvgSjK+ZxHIhTzmO aR7CVDIV2QzMUxK36PacIWtMrimLSgouAjCUTp4Wu0JKzOBbQs3pcy3VOzYWRb3TSDfu 9NiFdp2+obLRpTwITH4tW513ea+nn7+3I3avzYqxLIihetVjni37GfGrCT7W9r5a4KAe 4wNC69PzJkDRKD+3XeaVvVxz14+HZ9fZn5Yds1AL6uxWoylbdgPlqkI4JKpiMUPhYosX 19/w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d21-20020a170902b71500b001733a63bf35si8458272pls.598.2022.08.29.06.33.53; Mon, 29 Aug 2022 06:34:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230487AbiH2NVP (ORCPT + 99 others); Mon, 29 Aug 2022 09:21:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230469AbiH2NUi (ORCPT ); Mon, 29 Aug 2022 09:20:38 -0400 Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB5F98768F for ; Mon, 29 Aug 2022 06:18:09 -0700 (PDT) Received: from imladris.surriel.com ([96.67.55.152]) by shelob.surriel.com with esmtpsa (TLS1.2) tls TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1oSedY-0005QW-1I; Mon, 29 Aug 2022 09:17:08 -0400 Message-ID: <37db29410990991555362154a371b58f47d3cb0c.camel@surriel.com> Subject: Re: [RFC 2/3] mm: changes to split_huge_page() to free zero filled tail pages From: Rik van Riel To: David Hildenbrand , alexlzhu@fb.com, linux-mm@kvack.org Cc: willy@infradead.org, hannes@cmpxchg.org, akpm@linux-foundation.org, kernel-team@fb.com, linux-kernel@vger.kernel.org Date: Mon, 29 Aug 2022 09:17:07 -0400 In-Reply-To: <42c164c6-8c69-7b4b-d965-ac62d1607061@redhat.com> References: <490fcdd204ae129a2e43614a569a1cf4bdde9196.1661461643.git.alexlzhu@fb.com> <6448b9a8dba8ef39e42e56a3c0ce0633fff7c6a6.camel@surriel.com> <42c164c6-8c69-7b4b-d965-ac62d1607061@redhat.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-ewTTOtihmzCHaP0At5qy" User-Agent: Evolution 3.42.4 (3.42.4-1.fc35) MIME-Version: 1.0 Sender: riel@shelob.surriel.com X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-ewTTOtihmzCHaP0At5qy Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2022-08-29 at 12:02 +0200, David Hildenbrand wrote: > On 26.08.22 23:18, Rik van Riel wrote: > > On Fri, 2022-08-26 at 12:18 +0200, David Hildenbrand wrote: > > > On 25.08.22 23:30, alexlzhu@fb.com=C2=A0wrote: > > > > From: Alexander Zhu > >=20 > > I could see wanting to maybe consolidate the scanning between > > KSM and this thing at some point, if it could be done without > > too much complexity, but keeping this change to split_huge_page > > looks like it might make sense even when KSM is enabled, since > > it will get rid of the unnecessary memory much faster than KSM > > could. > >=20 > > Keeping a hundred MB of unnecessary memory around for longer > > would simply result in more THPs getting split up, and more > > memory pressure for a longer time than we need. >=20 > Right. I was wondering if we want to map the shared zeropage instead > of > the "detected to be zero" page, similar to how KSM would do it. For > example, with userfaultfd there would be an observable difference. >=20 > (maybe that's already done in this patch set) >=20 The patch does not currently do that, but I suppose it could? What exactly are the userfaultfd differences here, and how does dropping 4kB pages break things vs. using the shared zeropage? --=20 All Rights Reversed. --=-ewTTOtihmzCHaP0At5qy Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEyBAABCAAdFiEEKR73pCCtJ5Xj3yADznnekoTE3oMFAmMMvFMACgkQznnekoTE 3oN0jAf4rHO+YfpYMXfHD18EnjUbWe5R2ZnUT7wVZGN2DsP5qndjRMtnerruYVI3 0rCfGLFYBqhcYeeBcsA/jaxJDuGCJGxPkm4hyLW3kLz9x5txWVybLRaedq/47xZz TmGtIm5W2DWF/OROaQWBqSWM+uWFSD1VKYfE9/ZpGqVOybNaQtbFH82Hb/+Jvuyj QJeMWMyvpOTmcg2Rdsqj1DCbddp4U9KDOHtVuTstCpZuL1jrO3lgu1PYfkY58/Cj mQifBMMWmHHEyLtpjRd6okKILcz8PxKGttOZgK3c/d2A9SwqkIeK4BbbfVi44mI3 eU4D6A9vfeg6UbW3S9M9vs9Oq+Lt =uOBY -----END PGP SIGNATURE----- --=-ewTTOtihmzCHaP0At5qy--