Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1445469ybg; Thu, 11 Jun 2020 10:01:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxay6aSDiYKxjAifTEIzdKb2PMFPlKf9lhnoA/9Y3MzhygQ06pDGzd+S0vvB06ww/vhoVXF X-Received: by 2002:a17:906:90d4:: with SMTP id v20mr8967644ejw.471.1591894913776; Thu, 11 Jun 2020 10:01:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591894913; cv=none; d=google.com; s=arc-20160816; b=BZaknELPPL/fLd8Dmo7Cjw5HsO29qsKS5HU4CdJXDyovs0tDZZIj4FjEbFRf+eUG+9 m+G4/LgHE3zS50Wn6lPAWY0MpBW9odBwtSMlhjB11fhgbw3FaucNGk1ruPdtygI89JLa gSkZ+o0M3fTy9QtW7JlsyCmqSOhYaLQ46jRQe74Ly64iKQB2gWfm8e95xi5EMTAIDXZk y74+8KXa/iOlJjj6BnAPtVbdNnIMKLGPGYv0BeXTi2CeRuwkXiab2U3nHNtD/CejdNzy ls6cj0x7euwqBMptFxjK7V/tp70klGboIR7NJuXxlDenYxTv2GXbOJcV8whGyo1fdCdk c6Mg== 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=pATssJ82ubYGIfysCxQP65ExUCwZERILo2N1U80Ii2M=; b=iHZjyxv26n5tHewb6RQrbbmlAMnjX7mx6bSMyEZyVG6q3M8BnxGN1aP3XQPZbKjaF9 P2VUeXZsG6TUhm9M1iv3EkyuL0pSlaAG7hPkbOna4TayNks4+6gDczS2VFQTRb4VrxDW S0jfddPm0dP7h59djAYtwppGXjwZqEVlbt+prUwUtRQHrkHG+kT+V3V/WCCb64Ohwv1B cT/3LwTYkiTpZtWFqzlqIRC95BOyFirE5fJXCQ84BjDrocYJnmAhohqoW8TaDEceihwR pAGnOIrGMET/CIB6XRxVsUEKy5AAWbjfQnrdnUZWL8IHV6zGQMPNpSxvMM3WaAmYmRYo l8gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=ymBiEkAW; 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 nh1si2195358ejb.255.2020.06.11.10.01.28; Thu, 11 Jun 2020 10:01:53 -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=ymBiEkAW; 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 S1726577AbgFKQ7Q (ORCPT + 99 others); Thu, 11 Jun 2020 12:59:16 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:34820 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726542AbgFKQ7Q (ORCPT ); Thu, 11 Jun 2020 12:59:16 -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 05BGr7IF092042; Thu, 11 Jun 2020 16:58:51 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=pATssJ82ubYGIfysCxQP65ExUCwZERILo2N1U80Ii2M=; b=ymBiEkAWF8S8FJFO5+E1nZzVGvGj5tvwF9MQHSMRfCe0zn/6Zd8KfSKZmXzecXKptOjP u027pNP7g2yBCYKO4lgyzKJWMAWLowT6TN4mv1VR0YpxZNaG1WNEUVNiqEFZwsHHpYKG xzcC+gLzGjRfA1qjLSKjMoA4nXEHL7EgVV7Bb0KgrIG7r5/r8Q12jjMF0ydGeWa2kM80 c9Kh+t3ngVJF6eN4mUFqXu3dwBdm9hZLmjLYhiLY9yQwkzRp79HVJ/um3pZ4sWTWsfY3 kDvUiX7fekE/tO2RlNuK5MVokUGjKbf7x/y+uMJPrfELtWrYagy38ctV0+rVwLEAXQDE 8g== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 31jepp2v65-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 11 Jun 2020 16:58:51 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 05BGs9kl046671; Thu, 11 Jun 2020 16:58:50 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3030.oracle.com with ESMTP id 31gmqsdpp8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 11 Jun 2020 16:58:50 +0000 Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 05BGwihH031049; Thu, 11 Jun 2020 16:58:48 GMT Received: from ca-dmjordan1.us.oracle.com (/10.211.9.48) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 11 Jun 2020 09:58:44 -0700 Date: Thu, 11 Jun 2020 12:59:10 -0400 From: Daniel Jordan To: Dave Hansen Cc: Daniel Jordan , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Andy Lutomirski , Dave Hansen , David Hildenbrand , Michal Hocko , Pavel Tatashin , Peter Zijlstra , Steven Sistare Subject: Re: [PATCH v2] x86/mm: use max memory block size on bare metal Message-ID: <20200611165910.6dwd3c7z5brimjbm@ca-dmjordan1.us.oracle.com> 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: User-Agent: NeoMutt/20180716 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9649 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 bulkscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 spamscore=0 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006110133 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9649 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 suspectscore=0 priorityscore=1501 bulkscore=0 clxscore=1015 phishscore=0 impostorscore=0 malwarescore=0 mlxscore=0 cotscore=-2147483648 adultscore=0 spamscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006110133 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 11, 2020 at 07:16:02AM -0700, Dave Hansen wrote: > On 6/9/20 3:54 PM, Daniel Jordan wrote: > > + /* > > + * Use max block size to minimize overhead on bare metal, where > > + * alignment for memory hotplug isn't a concern. > > + */ > > + if (hypervisor_is_type(X86_HYPER_NATIVE)) { > > + bz = MAX_BLOCK_SIZE; > > + goto done; > > + } > > What ends up being the worst case scenario? Booting a really small > bare-metal x86 system, say with 64MB or 128MB of RAM? What's the > overhead there? Might not be following you, so bear with me, but we only get to this check on a system with a physical address end of at least MEM_SIZE_FOR_LARGE_BLOCK (64G), and this would still (ever so slightly...) reduce overhead of memory block init at boot in that case.