Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp454385ybt; Fri, 19 Jun 2020 06:00:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjTSxCzxEcZU5M/Cf9RNBkvTGpqMHdUQHD06BBMpgc6Vm4FECv/FpmdtYvCLv1MILnKdJW X-Received: by 2002:a17:907:402e:: with SMTP id nr22mr3394191ejb.239.1592571639647; Fri, 19 Jun 2020 06:00:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592571639; cv=none; d=google.com; s=arc-20160816; b=bqVwyizooejYmXKkbY9w+gQc5VgeHMyLbGuWEL5U47QbSI5LnJo58ilQ1VjR8hF3jt 1kovoHXa0GC7lkDikcgPspLxIO8FO6ZX+CIMO1KQKCw4iKdWaNanS4jvDqQ0yiDIc0FO UOAImeKk0N+hk5dCeZcveEeLAHQXmXC9Gdlc84kOhisbM0OzZsAzPYfccvyitTyLmqAv gMdHM9GUizfPalkmixLDaXMOaJvJMZYxNyKwibNw8BDXfJh4jddqeIiniCGfOBTYQbBS Qyzs8VgbbVy1Na21X1Zlt4mD4YYu1Fj78MrOnfZJlp7k2OAOo3noCMLyh24P52vmLuK+ tOiQ== 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=FCgGElYZkmUmaA6JH2fsnooqQnU7ecDqoues9JmTDO4=; b=WBvCiTsIZ9MbJEkInWWx4dgJbxgmmKdnWWcNdCU+Rfgaz/him/F3soKN/fp81UKWRp fmOZkDxwlRZkQwKncd/e/YuVv+DFEGyq/7c9l8nQLmg/e8xLuKeNtAj6kicnJleuVErz UHsYvXKeb6M+zQLgQDWgqlcQYAMr0qU8PTGkdBljLq54gReD3RwTSBVDOpapU7n54sY7 2DqDJpBbA8OO1ZAIMk78AoOGTQ+fFV5NZ5BD2ROZfEUIXVfm8Uv3udEG48HPhsD7Bxwl sMD5+sW84V1Me86IK2UjQsFBktbkE/5oTcfw+OQyTbtqQbPNJolBV3JeYA9nLGRR4DpX dHFA== 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i8si3610745ejz.15.2020.06.19.06.00.17; Fri, 19 Jun 2020 06:00:39 -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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732741AbgFSMHJ (ORCPT + 99 others); Fri, 19 Jun 2020 08:07:09 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:32821 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731776AbgFSMHI (ORCPT ); Fri, 19 Jun 2020 08:07:08 -0400 Received: by mail-ed1-f67.google.com with SMTP id o26so7438875edq.0 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=liet1sk2OZC/E0wskDpeTTREqZ2K6z0V+Ar5IK4CUmCMwoLfWqsOsJUO+GNmWghycG RjA0ue7krIvNwLSw8FlF16PRmzy41KoGUQZLwjM9MhIGYX/7exGL9ygDvYtzs160DFC5 scEf4vccuHK556BPmVN/Pqj6NetFyxj958AkxOP2T6ogW+xtD8z2RiEO+2rPAzoVBmiZ mPh3novCLXB0zLzgbtxCZm0X0ubG2nXAAXjXva9ZYhKM4/oGSYrSfwsqmjUKQHJeZJGE kkriH9xJf7vhY4GSKXf11dn4hFPBI92DjdUBp37uhPt94PPfTGjk+DBt6s3KZj2DTgJc ku7A== X-Gm-Message-State: AOAM530QOrjMaPpFon9X7jahVcIh9G3D3swOh1y1dX0BfvHk2s9fDe44 NC2aJZmJRJuvqISw8Sowld8= 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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