Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp436257pxk; Wed, 9 Sep 2020 09:07:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydBJpKSM3Kpp/pBOtFYaQH9YRNBdjA5m457R6pjnNODsusD8KXTT9jScYFmJf9PRa8Tn8F X-Received: by 2002:a05:6402:1717:: with SMTP id y23mr5070053edu.112.1599667679085; Wed, 09 Sep 2020 09:07:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599667679; cv=none; d=google.com; s=arc-20160816; b=caX5NsmfP4dSiC0KJbs1FjM3Lm2aHhCd8uOTPtZUuXGgSydv3dolKzrgQ9JwgcHlMS mpVzVPNLaRQIJM/a1AtjkoX9HQSzkjWKs07FvCU2/qNQkFePjX2WDgkgFe3/rnUJd1aP RZkwcj3E5iWaTCfcLtC0h7I2Hl2udf/XdURSbwa8vMtaZ9779lViL91MFKLJdKJIU+F2 QA/KaTRChhYwFLoXNenJ/+3HUD/txwt5Iyu7Q7DjYh6GHiX4GGLS1R9AIPJjPuJgI6KZ LwqLOdQada8qYG8VoWgA/osucXPbhiV5OkuLBFmr02si6aDVmdU7cGOlM4MopTNkH98r WBHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=9+LexFvMGBrMf3yWZr4atscZPIFIYrq3RFve7Pia+Ow=; b=cNlFL+6Nj5QL3HoYC70fxGFJFOTa1TNdb0CRqb8XnR0Qu4R+TfI3f5phi8MG/aK1Um G2VPIeH8diICqzWNZpW7gVzdi1L0nBi1b/HH7KAYKNlN/VIdNuxlklTN9ARGQD05POTz CHoDPcBzfCRZAlJRJdWAI/Uewg6yPO72hHAgVEURmeTfga4Om2qWIIQqz5LbJVFdxnCa CHcrKeBatu+sowRM3kCYgGP5IzKxMGzMYFE78/Iknco8k0ukLV5Ej4Pi8h6CIcwGuxv3 UL2q+atk4MH8to6iqJCpSQiSBAI1PdSjnoC9m29udJVVqWxFeaOX4MKIbizA4ooI1hPR l+LA== 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 ec15si1788524ejb.236.2020.09.09.09.07.34; Wed, 09 Sep 2020 09:07:59 -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 S1730587AbgIIQFZ (ORCPT + 99 others); Wed, 9 Sep 2020 12:05:25 -0400 Received: from mx2.suse.de ([195.135.220.15]:38034 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730877AbgIIQDp (ORCPT ); Wed, 9 Sep 2020 12:03:45 -0400 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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