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=-1.0 required=3.0 tests=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 4EF61C433E0 for ; Fri, 19 Jun 2020 12:09:00 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1562B2083B for ; Fri, 19 Jun 2020 12:08:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1562B2083B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 88CDD8D0097; Fri, 19 Jun 2020 08:08:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 83DEF8D0089; Fri, 19 Jun 2020 08:08:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7056E8D0097; Fri, 19 Jun 2020 08:08:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0065.hostedemail.com [216.40.44.65]) by kanga.kvack.org (Postfix) with ESMTP id 552FF8D0089 for ; Fri, 19 Jun 2020 08:08:59 -0400 (EDT) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 1659F2C9D for ; Fri, 19 Jun 2020 12:08:59 +0000 (UTC) X-FDA: 76945840398.27.tub19_020c33926e18 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin27.hostedemail.com (Postfix) with ESMTP id 12F30CF46D for ; Fri, 19 Jun 2020 12:07:08 +0000 (UTC) X-HE-Tag: tub19_020c33926e18 X-Filterd-Recvd-Size: 4185 Received: from mail-ed1-f66.google.com (mail-ed1-f66.google.com [209.85.208.66]) by imf24.hostedemail.com (Postfix) with ESMTP for ; Fri, 19 Jun 2020 12:07:07 +0000 (UTC) Received: by mail-ed1-f66.google.com with SMTP id d15so7375202edm.10 for ; Fri, 19 Jun 2020 05:07:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=FCgGElYZkmUmaA6JH2fsnooqQnU7ecDqoues9JmTDO4=; b=JD2XJQ5YaqWqq/LB8QjHgiCy2g1MxxyIK+UQ/1OMo8sn4nn5qhKZtcjnIa/qKHBIMK xvlca+fWqTEEuFgJkMFW/jdrLvyTSYqsOm2YIqtQGQf3PedUfDQYpGCexXtKR+RldZ4y oZHoZWNpB5M0045REY0pTTSplFkOrrODB4xZXwuetiG0gdDbicmQiIwqd7j6xKwGH09X Xt4xiIlI8N9YoKu0Q+LJF97GVJN6pg4N22JqyRh2LkqYc9RqqtQUbbMlOsF3RzgM+D5t JEa2VKPiAXi2W34dpQyLlJTZ0h4J2sU40IuqUZDJcg72+gi+PbaM4mcfEGtugB/wPhOC WEOg== X-Gm-Message-State: AOAM531l9iS+ywka62jBJOjikgsULzqyb2P9CiMQjCE5HR/EkcmOdp66 WGYEVkV2VInaHXYk31fObpI= X-Google-Smtp-Source: ABdhPJwanPG2AiqwbdvTfmxmMlKJkv9Ym8BRRBtspbNfvUfvQbUcEvc9LjS5GY4fUw4XoO9ZCSziWg== X-Received: by 2002:aa7:ccc2:: with SMTP id y2mr2879408edt.97.1592568426584; Fri, 19 Jun 2020 05:07:06 -0700 (PDT) Received: from localhost (ip-37-188-189-34.eurotel.cz. [37.188.189.34]) by smtp.gmail.com with ESMTPSA id t9sm4650506ejy.43.2020.06.19.05.07.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jun 2020 05:07:05 -0700 (PDT) Date: Fri, 19 Jun 2020 14:07:04 +0200 From: Michal Hocko To: Daniel Jordan Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Andy Lutomirski , Dave Hansen , David Hildenbrand , Pavel Tatashin , Peter Zijlstra , Steven Sistare Subject: Re: [PATCH v2] x86/mm: use max memory block size on bare metal Message-ID: <20200619120704.GD12177@dhcp22.suse.cz> References: <20200609225451.3542648-1-daniel.m.jordan@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200609225451.3542648-1-daniel.m.jordan@oracle.com> X-Rspamd-Queue-Id: 12F30CF46D X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 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 Tue 09-06-20 18:54:51, Daniel Jordan wrote: [...] > @@ -1390,6 +1391,15 @@ static unsigned long probe_memory_block_size(void) > goto done; > } > > + /* > + * Use max block size to minimize overhead on bare metal, where > + * alignment for memory hotplug isn't a concern. This really begs a clarification why this is not a concern. Bare metal can see physical memory hotadd as well. I just suspect that you do not consider that to be very common so it is not a big deal? And I would tend to agree but still we are just going to wait until first user stumbles over this. Btw. memblock interface just doesn't scale and it is a terrible interface for large machines and for the memory hotplug in general (just look at ppc and their insanely small memblocks). Most usecases I have seen simply want to either offline some portion of memory without a strong requirement of the physical memory range as long as it is from a particular node or simply offline and remove the full node. I believe that we should think about a future interface rather than trying to ducktape the blocksize anytime it causes problems. I would be even tempted to simply add a kernel command line option memory_hotplug=disable,legacy,new_shiny for disable it would simply drop all the sysfs crud and speed up boot for most users who simply do not care about memory hotplug. new_shiny would ideally provide an interface that would either export logically hotplugable memory ranges (e.g. DIMMs) or a query/action interface which accepts physical ranges as input. Having gazillions of sysfs files is simply unsustainable. -- Michal Hocko SUSE Labs