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=-7.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 C3149C433E0 for ; Mon, 8 Mar 2021 14:07:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3C11E64EBC for ; Mon, 8 Mar 2021 14:07:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3C11E64EBC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9A9C86B00D7; Mon, 8 Mar 2021 09:07:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9660C6B00D8; Mon, 8 Mar 2021 09:07:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7D4DE6B00D9; Mon, 8 Mar 2021 09:07:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0032.hostedemail.com [216.40.44.32]) by kanga.kvack.org (Postfix) with ESMTP id 60B2B6B00D7 for ; Mon, 8 Mar 2021 09:07:07 -0500 (EST) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 14A288249980 for ; Mon, 8 Mar 2021 14:07:07 +0000 (UTC) X-FDA: 77896883694.19.795EF12 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by imf13.hostedemail.com (Postfix) with ESMTP id 63CF0E005F1B for ; Mon, 8 Mar 2021 14:07:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615212419; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=63LYmPLrfJ8KifIgwmybBujkdfwC9STV33E842vx5Bs=; b=TDVifKotc+z7VwXfMWZHD6Nu8vya4IvosaVH6qG1gwdMjKzJ+JLvA3YlnRW6hr+eV5srEu 4BfTFOjvS6yeIUu5YNQqkn6gYuIDeEPwuQkfQQYRwdSoPftZez92WPn4epN6VY6TOKop38 hOUbHFwPK2w1YFZ5S8wHSl2fBuPbFiE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-370-NJVchPOqMbudJ4dpdgmFJQ-1; Mon, 08 Mar 2021 09:06:54 -0500 X-MC-Unique: NJVchPOqMbudJ4dpdgmFJQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B37A51005D45; Mon, 8 Mar 2021 14:06:52 +0000 (UTC) Received: from [10.36.113.123] (ovpn-113-123.ams2.redhat.com [10.36.113.123]) by smtp.corp.redhat.com (Postfix) with ESMTP id 758F650C0D; Mon, 8 Mar 2021 14:06:50 +0000 (UTC) Subject: Re: [PATCH v3 1/5] mm,memory_hotplug: Allocate memmap from the added memory range To: Oscar Salvador , Zi Yan Cc: Andrew Morton , Michal Hocko , Anshuman Khandual , Vlastimil Babka , Pavel Tatashin , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Mike Kravetz References: <20210304100002.7740-1-osalvador@suse.de> <20210304100002.7740-2-osalvador@suse.de> <830F715B-82B4-4A13-861F-B3A89327F722@nvidia.com> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: <51662b87-35bd-ff18-17dd-b2a99d1095d7@redhat.com> Date: Mon, 8 Mar 2021 15:06:49 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 63CF0E005F1B X-Stat-Signature: aukbuqfr676uixgokz1jtdurp54thmo1 Received-SPF: none (redhat.com>: No applicable sender policy available) receiver=imf13; identity=mailfrom; envelope-from=""; helo=us-smtp-delivery-124.mimecast.com; client-ip=63.128.21.124 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1615212423-556681 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 08.03.21 15:04, Oscar Salvador wrote: > On Sun, Mar 07, 2021 at 10:16:36PM -0500, Zi Yan wrote: >> +Mike for hugetlb discussion. >> >> Just thinking about how it might impact gigantic page allocation like hugetlb. >> When MHP_MEMMAP_ON_MEMORY is on, memmap pages are placed at the beginning >> of each hot added memory block, so available PFNs from two consecutive >> hot added memory blocks are not all contiguous, separated by memmap pages. >> If the memory block size is <= 1GB, there is no way of reserving gigantic >> pages for hugetlb during runtime using alloc_contig_pages from any hot >> added memory. Am I getting this right? > > Yes, that is why it is stated both in boot parameter documentation and > patch changelog that this feature does not play well in those setups > where your workload is in need of large contiguous chunks of memory, > that being gigantic hugetlb or just normal memory. > >> I see this implication is documented at the high level in patch 3. Just >> wonder if we want to be more specific. Or hugetlb is rarely used along >> with hot-add memory. > > I think it is quite normal to see hugetlb and hotplug operations in the > same environment. > One thing excludes the other, just need to be careful when it comes to > potential pitfalls during offline operations. > > I guess we could mention hugetlb pages in the documentation, if it feels > it is necesary. Runtime allocation of gigantic pages without CMA is absolutely unreliable either way. IMHO, a tunable for the admin is good enough. -- Thanks, David / dhildenb