Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1083859pxk; Thu, 10 Sep 2020 06:45:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRtgvrLL/FB8ONSuodMQCGcljKQRLCrbrw4tF9hvziVsRMzWo7Aqj6XeQRfXVqFMVvU3Ql X-Received: by 2002:a17:906:a88a:: with SMTP id ha10mr9569018ejb.532.1599745505517; Thu, 10 Sep 2020 06:45:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599745505; cv=none; d=google.com; s=arc-20160816; b=idY9lvKTuU7zp2JQgjIYB5CYbUE59xwQ2e1sw/qYqTsmgO7PclRhRtYWhyOnLoQUX5 GeayFSrgWSbl5p243CoSvoHe56U1jzwq/48Trc5GhyVxvfkQWHBtjlRENRywfbRDrhE7 mF4FrpBSIyncLF29EeCwsu+dfoLQv9CKJmh9rqBWiN14xK8HxaFvZAYzoyZTSjj/XebH 4jbHsS2j3zpDe5NZNv6IuaQjLsCeA8s/V7XoKYAIcPNXysP0tqdHUxLW6jj08T0kxU23 5FTzKjv7eAC96xdHQc9Y3Fr8c42FY2I50ts5S6w/BtlYrR1yLlDNuc5HjGRTDGqudsY5 A/5Q== 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=b5vl8XbRQZQhsosijQQ8qS+iKQhXddWgenVMRr4Nvn0=; b=D0v8cg6DLeyMZjIdi95mmr2d8eZIowKuj1XGuiJI8QU1ocgxVjW7lJ1GJ/pFVCbL2x SRcXE3GtiKzUwfGyloBeQ3GLkRcv+0pYTE5YnpcHjsOFTkm5NdLoN6NQthBcG/L5Pm1V rHjUqwUdXuPHLUCvOa4/Yu9NlZ1avJfr8iZ64pER60nh00s4oNfGmH60CelYL/Hluhef mXwAysLuVcGrwliwx8bZrRkAiam9bGFouCDL68ICccddayDZPqlVUSxv2cxSfRqR6qTA sB7kibxYgB/V4EeyMXCp+DUuMNJhXfU0HS93/F8iZEezVzjwcAv42UeQPjSyDY6hv9s4 uCmw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l8si3684060edr.396.2020.09.10.06.44.39; Thu, 10 Sep 2020 06:45:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730764AbgIJNfn (ORCPT + 99 others); Thu, 10 Sep 2020 09:35:43 -0400 Received: from shelob.surriel.com ([96.67.55.147]:49224 "EHLO shelob.surriel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727770AbgIJNdb (ORCPT ); Thu, 10 Sep 2020 09:33:31 -0400 Received: from imladris.surriel.com ([96.67.55.152]) by shelob.surriel.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1kGMh2-0006FE-1B; Thu, 10 Sep 2020 09:32:52 -0400 Message-ID: Subject: Re: [RFC PATCH 00/16] 1GB THP support on x86_64 From: Rik van Riel To: Michal Hocko , David Hildenbrand Cc: Zi Yan , Roman Gushchin , "Kirill A. Shutemov" , linux-mm@kvack.org, "Kirill A . Shutemov" , Matthew Wilcox , Shakeel Butt , Yang Shi , David Nellans , linux-kernel@vger.kernel.org, Vlastimil Babka , Mel Gorman Date: Thu, 10 Sep 2020 09:32:51 -0400 In-Reply-To: <20200910073213.GC28354@dhcp22.suse.cz> References: <20200902180628.4052244-1-zi.yan@sent.com> <20200903142300.bjq2um5y5nwocvar@box> <20200903163020.GG60440@carbon.dhcp.thefacebook.com> <8e677ead-206d-08dd-d73e-569bd3803e3b@redhat.com> <7E20392E-5ED7-4C22-9555-F3BAABF3CBE9@nvidia.com> <20200908143503.GE26850@dhcp22.suse.cz> <7ed82cb06074b30c2956638082c515fb179f69a3.camel@surriel.com> <20200909070445.GA7348@dhcp22.suse.cz> <054d02f3b34d9946905929ff268b685c91494b3e.camel@surriel.com> <6135d2c5-2a74-6ca8-4b3b-8ceb25c0d4b1@redhat.com> <20200910073213.GC28354@dhcp22.suse.cz> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-G7jPvQFniVHuvttGpe5D" User-Agent: Evolution 3.34.4 (3.34.4-1.fc31) MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-G7jPvQFniVHuvttGpe5D Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2020-09-10 at 09:32 +0200, Michal Hocko wrote: > [Cc Vlastimil and Mel - the whole email thread starts > http://lkml.kernel.org/r/20200902180628.4052244-1-zi.yan@sent.com > but this particular subthread has diverged a bit and you might find > it > interesting] >=20 > On Wed 09-09-20 15:43:55, David Hildenbrand wrote: > >=20 > > I am not sure I like the trend towards CMA that we are seeing, > > reserving > > huge buffers for specific users (and eventually even doing it > > automatically). > >=20 > > What we actually want is ZONE_MOVABLE with relaxed guarantees, such > > that > > anybody who requires large, unmovable allocations can use it. > >=20 > > I once played with the idea of having ZONE_PREFER_MOVABLE, which > > a) Is the primary choice for movable allocations > > b) Is allowed to contain unmovable allocations (esp., gigantic > > pages) > > c) Is the fallback for ZONE_NORMAL for unmovable allocations, > > instead of > > running out of memory >=20 > I might be missing something but how can this work longterm? Or put > in > another words why would this work any better than existing > fragmentation > avoidance techniques that page allocator implements already -=20 One big difference is reclaim. If ZONE_NORMAL runs low on free memory, page reclaim would kick in and evict some movable/reclaimable things, to free up more space for unmovable allocations. The current fragmentation avoidance techniques don't do things like reclaim, or proactively migrating movable pages out of unmovable page blocks to prevent unmovable allocations in currently movable page blocks. > My suspicion is that a separate zone would work in a similar fashion. > As > long as there is a lot of free memory then zone will be effectively > MOVABLE. Similar applies to normal zone when unmovable allocations > are > in minority. As long as the Normal zone gets full of unmovable > objects > they start overflowing to ZONE_PREFER_MOVABLE and it will resemble > page > block stealing when unmovable objects start spreading over movable > page > blocks. You are right, with the difference being reclaim and/or migration, which could make a real difference in limiting the number of pageblocks that have unmovable allocations. --=20 All Rights Reversed. --=-G7jPvQFniVHuvttGpe5D Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEKR73pCCtJ5Xj3yADznnekoTE3oMFAl9aKwMACgkQznnekoTE 3oMhTwf6AoqGVXG7ULgvW3VwQU3fHYeVY7XdxCw0eYfEWQ5mmjdh7pMVL4+9IEJS OhK3nlbmC63C3TYpa1asQUSy6hAx0Apo/E7Cx9VJkP2+3oVkbP6ibqtZmJh4X1IQ 9HbBHX8YOxpUXl3/RHARzTo4cnwYrgQTLpumSG0B+207FmQc7zLoNsfXGXsLFPrP I/KKiSDlQ4asbeHlQU/PW87xXNCWCyjbZedPPx98WIgQE3LeRvWD3ZhlwtEQEJXP Xsy1hT0aKsjg9dFpWFPClDs8f+EV+gcNIqidHMXrPAIUMySGL+C/VBHKeg2ioSyB Qu4W/1woZ6HdiWlE4jweWiTy+6RAug== =m/ZB -----END PGP SIGNATURE----- --=-G7jPvQFniVHuvttGpe5D--