Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp116100pxk; Wed, 9 Sep 2020 00:06:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxaJ3JRiClgeRBJ8w3fNeBqEJc/sggICu9SfUL6O+ch2DgzGqbpgu+H6XGlDYfkw46YonNB X-Received: by 2002:aa7:de91:: with SMTP id j17mr2687911edv.85.1599635175126; Wed, 09 Sep 2020 00:06:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599635175; cv=none; d=google.com; s=arc-20160816; b=X7Oo146Bpu9twqCNh3SmvnxX/wZc+wvYTgOgQ0UAOvVeOmoxNU78R+g8Nj3o3p8eS+ I/PSFMYnYSl8/9CpL5awrLbn5pGd3S7t1dgmTK52xhmLsLtDZwtTlr+ayDSMiA6+EyGs XLF998ts32qpyo/gg5tRID/oNDluZ/3j2j9T5KnriCNC9BMjQFby7SbLRfsqeNySjkde PF58TJBLD0NVmp73wKfdfbSItRDjlIAYlnfQ7C9s7LrOD+UD87M/l3np5Ia+6x00SS5o TcLArb/JV7hfyaoLMnBDXuCrUUifqz2lllbCs70mZV/Xt1yXypwy3pbY2dUL6GP5iRPd Yl0w== 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=aMDVveE4nAH1xSPLJDuKpao0gzDfV3jrQVaMs9XgwDg=; b=bYgn0dkfqLFNTpJ++rwPV0GyDWIBCQ5TtAzwRRIMCjn/3+TTrP0OAk8rmhLbWhPTj7 83szOowc5KeRREV8qb7ZI1ng4dG0T2ptS3PQDdotf9he+59L4aiaHATerd6OsAVDtqAo vcZ66y2ifLcBuUr8wt/gs8kWGDq55ZCvj/Yi9199jgHAzguibK9m5JlgkMLcLiniel/Q KI9iBrHIow4XHnN539q/2CJNT9z6KPbbUBbbKKAEuedjFf0ypPXxSYdB7R3Il2JaLZ1X axfXF7a7iZNeDLGwWVVmvbDZe7atS+eJAd+yeUsXoQ7s51r0UGmxFoJH/XoeHjNw0FjS /GBw== 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 f6si420034edj.365.2020.09.09.00.05.52; Wed, 09 Sep 2020 00:06:15 -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 S1728405AbgIIHEw (ORCPT + 99 others); Wed, 9 Sep 2020 03:04:52 -0400 Received: from mx2.suse.de ([195.135.220.15]:58080 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726708AbgIIHEs (ORCPT ); Wed, 9 Sep 2020 03:04:48 -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 4B0E6ADFE; Wed, 9 Sep 2020 07:04:48 +0000 (UTC) Date: Wed, 9 Sep 2020 09:04:45 +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: <20200909070445.GA7348@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7ed82cb06074b30c2956638082c515fb179f69a3.camel@surriel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > That makes it relatively easy to set aside > some fraction > of system memory in every system for 1GB and movable > allocations, and use it for whatever way it is needed > depending on what workload(s) end up running on a system. I was not talking about how easy or hard it is. My main concern is that this is effectively a pre-reserved pool and a global knob is a very suboptimal way to control access to it. I (rather) strongly believe this should be an explicit opt-in and ideally not 1GB specific but rather something to allow large pages to be created as there is a fit. See other subthread for more details. -- Michal Hocko SUSE Labs