Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp793298ybt; Wed, 8 Jul 2020 11:49:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmudxhfaaj0J9oaCv/dlFBwHG1f7RceGnEc8KCOHt49730f1gEvs3kD9A9IM49zf+0dOK3 X-Received: by 2002:a17:906:38da:: with SMTP id r26mr51381863ejd.120.1594234170916; Wed, 08 Jul 2020 11:49:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594234170; cv=none; d=google.com; s=arc-20160816; b=CFZ6w8LukxgKOAc11F+RKNkYLvvSvwJlq1pZsjeYR+ULQIJ3GMniZSEjJyY5+KmBOU Nllx6vn8BY92Wr5Hn0S4yApxl7CIrC4TWPw8SsZ4sQv4Io+gsj8Gr4xm3gWPF85s9TAs sJkjjuyc20GM0AZQoy+VFqIa6EqedEVf8wZlHVhJ5mu61lxnoiCMg7qFMVgA113etniR kGzIgIvlvFeE4JsdiremD+QiqNNr35cCbHHZj5mPHJnrK25luVM3bzjksU9QYyIKOMbc f1WwyC3FexHaVV5UzwGu9f1UJpzekh61iHnvylKEP8/RsmvipOaP8250eqzGz7RShN4S hiWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=x7DLMluUC/7HOTF4xjCPNrXQSNDJXkzxrZDOZDjcHOU=; b=UDQ8udAngiubK0Of32vgGif6zTwNWOsRzDNMZ9uy8Y6SXwzroNx/N0kc/sKOYNibo3 aP234MZNmyfmNmqXvnbdAAiBLZgwrB4Aw4UJr0EtGDXCFh0owSIbueARCrelIVRY280b tL1TG7llGHs1JVB5hDi/gqzr8XbrFVKOgKP8HqtcWEZX4TLwoJXywZ/iD2YOqGgB5Ve6 vjDOo5r5+lJreQobdehhcUjevk578gbNkU3jsPYegDeV++vhVUDIUX0JLvaMCKEupIYh tVGYQkAU2FupYMD+qvzGZy7Y30d5wbKN9RL2z5NWA9F32CyDJlxbWOxI1Snil7IfzAsV akWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=kRYWxxrI; 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=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dp6si500842ejc.472.2020.07.08.11.49.08; Wed, 08 Jul 2020 11:49:30 -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=@oracle.com header.s=corp-2020-01-29 header.b=kRYWxxrI; 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=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726682AbgGHSqa (ORCPT + 99 others); Wed, 8 Jul 2020 14:46:30 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:35402 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725937AbgGHSq3 (ORCPT ); Wed, 8 Jul 2020 14:46:29 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 068IacRb102685; Wed, 8 Jul 2020 18:46:15 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2020-01-29; bh=x7DLMluUC/7HOTF4xjCPNrXQSNDJXkzxrZDOZDjcHOU=; b=kRYWxxrIdowMMlIYOrpK8mwo6yvqOOKQZ/UCw4ZFoknBR/5aUvc0aSZicuB32KzW0Fvn I3hz7Izr1NPME4DCxijiFw1wqdQg9IyEKs6e7cAoD0OzTT79ZfCoFNE6Yd3Wzolw9xTi k4XY2G/4EGTgXiRwCyoSsY/sTfx7/3Vd5au4fRXymKaR1ntPrOfdqi926CdY++lDx7gX TddhRTygOJPu1+rtpQFiYvE3WS0AvRqZWJRliZnH8Dmh0ZxjY1BxCVSqjVMkkCNX8JTF iV2/M2AS6ZJT1SBygzDMlN1lF3RZ6kCi4n29nQ7sWbuewykLykahQf04E50OS9dZZKV1 Sw== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by aserp2120.oracle.com with ESMTP id 325k36876m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 08 Jul 2020 18:46:15 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 068IdBgo056916; Wed, 8 Jul 2020 18:46:15 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3020.oracle.com with ESMTP id 325k3eb77v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 08 Jul 2020 18:46:15 +0000 Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 068IkA9q023673; Wed, 8 Jul 2020 18:46:13 GMT Received: from ca-dmjordan1.us.oracle.com (/10.211.9.48) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 08 Jul 2020 11:46:10 -0700 Date: Wed, 8 Jul 2020 14:46:38 -0400 From: Daniel Jordan To: Michal Hocko Cc: Daniel Jordan , 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: <20200708184638.xildzedf5f7z5a4x@ca-dmjordan1.us.oracle.com> References: <20200609225451.3542648-1-daniel.m.jordan@oracle.com> <20200619120704.GD12177@dhcp22.suse.cz> <20200622191739.4lekqrmjnzv2vwl2@ca-dmjordan1.us.oracle.com> <20200626124706.GZ1320@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200626124706.GZ1320@dhcp22.suse.cz> User-Agent: NeoMutt/20180716 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9676 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxscore=0 mlxlogscore=999 phishscore=0 adultscore=0 suspectscore=0 malwarescore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007080114 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9676 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 impostorscore=0 mlxscore=0 adultscore=0 spamscore=0 mlxlogscore=999 malwarescore=0 priorityscore=1501 suspectscore=0 lowpriorityscore=0 clxscore=1011 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007080114 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org (I'm back now) On Fri, Jun 26, 2020 at 02:47:06PM +0200, Michal Hocko wrote: > On Mon 22-06-20 15:17:39, Daniel Jordan wrote: > > Hello Michal, > > > > (I've been away and may be slow to respond for a little while) > > > > On Fri, Jun 19, 2020 at 02:07:04PM +0200, Michal Hocko wrote: > > > 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. > > > > So in this idea, presumably the default would start off being legacy and then > > later be changed to new_shiny? > > Well it really depends. Going with disable as a default would suit most > users much better because the vast majority simply doesn't use the > functionality. On the other hand real users would regress unless they > enable the option. Which is definitely not nice. Agreed. > Another and much less > intrusive change would be creating sysfs interface on-demand. So until > somebody actually tries to use the interface it won't exist. I haven't > tried to explore how complex that would be. I am not really familiar > with sysfs to be honest. But fundamentally nothing should prevent such a > solution. Hm, don't know sysfs internals either. It seems possible that someone (or something...) navigating around could trigger creation unintentionally--for instance, by reading the symlinks to the memory block dirs in /sys/devices/system/node/nodeN when trying to find another file to read in the same place. > Another option would be to create sysfs interface only if there is a > hotplugable memory reported by the platform. But I am not sure we have a > proper interface for that for all arches. Systems that happen to have hotpluggable ranges but don't want the overhead would still be stuck, though, it seems. FWIW, the ideas for new_shiny sound promising.