Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4506819pxk; Wed, 30 Sep 2020 04:59:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTSW4YI99J6r4SXEKhvermrL7gW4rhey4ZvE9axNEALPOc8jSpQe4BmK2FUZ2uFvfBhAy6 X-Received: by 2002:aa7:cf05:: with SMTP id a5mr2335734edy.313.1601467141186; Wed, 30 Sep 2020 04:59:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601467141; cv=none; d=google.com; s=arc-20160816; b=T07O1A/QIraAn2GJoh7vTzdEgzF48ThDRY1fBMQFxJezm0cN/Rho1xhqGWjYx1yXeg HM9gdS4falhKu7wrNI/Hlix9qeYRRS1ic95tKgj8SkqI54piEGA1q9p4a4JBdumFr5mQ LOF6iy5aD1Z6E8cUKbtsdaGGrKDSfvweYDRPcJFF05OSHfFFzN5YneK6swwlLTmPJlce iyan6uuKgRoACuQGKHTvZU8oZmm4mXsgk9Tyk77n0ybcaJT0NPofTvUD8QsCxwNkrwJ1 jqzjxgVLcoKzlNsbNKH2VkhVDst+MtlPp6qrjMwJrdYEXovYZjkTkupoFv8u+gSrVzjz bL+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=ejKNHE0UFyqEBk7h2uyf05l7nr1RUgj4PZw1uir7ohM=; b=VFB32qnaZOBZCGixQjVEWXLXxELpD7Oki0zJ9l7ciI+I6bNTnJJVfZrn+yylcKo1hB BcfpKabE3AOMRSZUyRVFOpUqxjhl4w0mz3RuAtkiZYmC2Sjb5DW32BQGGhBI3D5Np5vK axG26un4TMSYtpWCE7W2Yl15d0el15JOtCuLPPwcRr56clSxHsI0nl0xyKJtdK2Vcn12 VbJ8Me+GAz8tpgzqZoheWepiwHC25uXfwkFixvSB1Oojavdx5sOuB/CygbYPctWiwBem RvjcqRsMkLTfs1wCLJloeiaWsFjPlTijtt942KPt76wfwGYbgE5ilWhjBD9eEvj8xBxk uQ9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=O8pXse5o; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ci27si1168355ejc.373.2020.09.30.04.58.38; Wed, 30 Sep 2020 04:59:01 -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; dkim=pass header.i=@suse.com header.s=susede1 header.b=O8pXse5o; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728367AbgI3LzI (ORCPT + 99 others); Wed, 30 Sep 2020 07:55:08 -0400 Received: from mx2.suse.de ([195.135.220.15]:36816 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725776AbgI3LzI (ORCPT ); Wed, 30 Sep 2020 07:55:08 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1601466906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ejKNHE0UFyqEBk7h2uyf05l7nr1RUgj4PZw1uir7ohM=; b=O8pXse5o8S+FxLSPFYMYcfq2SlzbpWZEp3RD4tOpHDzwYYNe731ThPPRGT2xhrVQiLy//v YbeJKQiuOAbDh5o6K1grN9ZErKnERRIiE0bxiHF4Sx9zl+8Q+ljsb7sQiv64MHAI+MV1kQ wi8eoc+3cMeYlejinBpW3Q8HOpA0kuk= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 3E255AE1B; Wed, 30 Sep 2020 11:55:06 +0000 (UTC) Date: Wed, 30 Sep 2020 13:55:05 +0200 From: Michal Hocko To: Zi Yan Cc: linux-mm@kvack.org, "Kirill A . Shutemov" , Roman Gushchin , Rik van Riel , Matthew Wilcox , Shakeel Butt , Yang Shi , Jason Gunthorpe , Mike Kravetz , David Hildenbrand , William Kucharski , Andrea Arcangeli , John Hubbard , David Nellans , linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v2 00/30] 1GB PUD THP support on x86_64 Message-ID: <20200930115505.GT2277@dhcp22.suse.cz> References: <20200928175428.4110504-1-zi.yan@sent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200928175428.4110504-1-zi.yan@sent.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 28-09-20 13:53:58, Zi Yan wrote: > From: Zi Yan > > Hi all, > > This patchset adds support for 1GB PUD THP on x86_64. It is on top of > v5.9-rc5-mmots-2020-09-18-21-23. It is also available at: > https://github.com/x-y-z/linux-1gb-thp/tree/1gb_thp_v5.9-rc5-mmots-2020-09-18-21-23 > > Other than PUD THP, we had some discussion on generating THPs and contiguous > physical memory via a synchronous system call [0]. I am planning to send out a > separate patchset on it later, since I feel that it can be done independently of > PUD THP support. While the technical challenges for the kernel implementation can be discussed before the user API is decided I believe we cannot simply add something now and then decide about a proper interface. I have raised few basic questions we should should find answers for before the any interface is added. Let me copy them here for easier reference - THP allocation time - #PF and/or madvise context - lazy/sync instantiation - huge page sizes controllable by the userspace? - aggressiveness - how hard to try - internal fragmentation - allow to create THPs on sparsely or unpopulated ranges - do we need some sort of access control or privilege check as some THPs would be a really scarce (like those that require pre-reservation). -- Michal Hocko SUSE Labs