From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C4EDC43461 for ; Wed, 9 Sep 2020 13:59:09 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A7CEC206A2 for ; Wed, 9 Sep 2020 13:59:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A7CEC206A2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 08910900003; Wed, 9 Sep 2020 09:59:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 038926B0073; Wed, 9 Sep 2020 09:59:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E8F59900003; Wed, 9 Sep 2020 09:59:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0039.hostedemail.com [216.40.44.39]) by kanga.kvack.org (Postfix) with ESMTP id D40336B0072 for ; Wed, 9 Sep 2020 09:59:07 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 9162382499B9 for ; Wed, 9 Sep 2020 13:59:07 +0000 (UTC) X-FDA: 77243679534.09.title81_3a141b5270dd Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin09.hostedemail.com (Postfix) with ESMTP id 6A227180AD815 for ; Wed, 9 Sep 2020 13:59:07 +0000 (UTC) X-HE-Tag: title81_3a141b5270dd X-Filterd-Recvd-Size: 3247 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf45.hostedemail.com (Postfix) with ESMTP for ; Wed, 9 Sep 2020 13:59:06 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 488D9AD1B; Wed, 9 Sep 2020 13:59:21 +0000 (UTC) Date: Wed, 9 Sep 2020 15:59:04 +0200 From: Michal Hocko To: Rik van Riel Cc: Zi Yan , David Hildenbrand , 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 Subject: Re: [RFC PATCH 00/16] 1GB THP support on x86_64 Message-ID: <20200909135904.GL7348@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <054d02f3b34d9946905929ff268b685c91494b3e.camel@surriel.com> X-Rspamd-Queue-Id: 6A227180AD815 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed 09-09-20 09:19:16, Rik van Riel wrote: > On Wed, 2020-09-09 at 09:04 +0200, Michal Hocko wrote: > > On Tue 08-09-20 10:41:10, Rik van Riel wrote: > > > On Tue, 2020-09-08 at 16:35 +0200, Michal Hocko wrote: > > > > > > > A global knob is insufficient. 1G pages will become a very > > > > precious > > > > resource as it requires a pre-allocation (reservation). So it > > > > really > > > > has > > > > to be an opt-in and the question is whether there is also some > > > > sort > > > > of > > > > access control needed. > > > > > > The 1GB pages do not require that much in the way of > > > pre-allocation. The memory can be obtained through CMA, > > > which means it can be used for movable 4kB and 2MB > > > allocations when not > > > being used for 1GB pages. > > > > That CMA has to be pre-reserved, right? That requires a > > configuration. > > To some extent, yes. > > However, because that pool can be used for movable > 4kB and 2MB > pages as well as for 1GB pages, it would be easy to just set > the size of that pool to eg. 1/3 or even 1/2 of memory for every > system. > > It isn't like the pool needs to be the exact right size. We > just need to avoid the "highmem problem" of having too little > memory for kernel allocations. Which is the problem why this is not really suitable for an uneducated guesses. It is really hard to guess the right amount of lowmem. Think of heavy fs metadata workloads and their memory demand. Memory reclaim usually struggles when zones are imbalanced from my experience. -- Michal Hocko SUSE Labs