Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp818186imu; Fri, 25 Jan 2019 11:34:23 -0800 (PST) X-Google-Smtp-Source: ALg8bN4/E3koMGszvDW0qdwe3H51x9Wusu0YQKB4NDWTJK9tHYq8R+EQ2YQmaSbUtp+Qzi3CthiC X-Received: by 2002:a17:902:4025:: with SMTP id b34mr12433409pld.181.1548444863063; Fri, 25 Jan 2019 11:34:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548444863; cv=none; d=google.com; s=arc-20160816; b=BoXblYe6tm+4EJ2/UFuFzotj8X3y+Lcx3lPJbmBh3xlZd0P5KiIqFXQR/LHZhb3Yy7 Cssfl1FD/Iz8nQd711ykQMtpLMz+CHh0DoWOwpXFP1pBdM+Wapte6lTTPWILI2kCcPP/ +K4u5hk5d0b/vhAY2lF7G7DpsVJeOkmcVML/sMbKjhNdAvbdCFsBHxSFpNhIgxf60ZRg RmDaZa+gDubsQ6xgFA/UYCIOOI4+w0uGo+0UZi3fGvq+uZqIpUw5+huHVBMMN0wY2DJT LTSNw6Hc/xWC6hYOWmBxeyIFfoVfqNFuU6VOhLIO2y7/tXgYqRH2p/rSb/y7Oje60D3p p8Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:subject:cc:to:from:date; bh=50HqiYNo6E9r7isTmnSSmHbSypuMMDEwGLt8Q5a+rXI=; b=kX76XR8Ly/2uZQAZzhmaB/EPogE80zUWQbljU/u5sHZg9uzpO3FfWSGzjkcC+FehIY JC8muxGdcrOAUZg1OExhefTCAWViVG/7i83MkyX+SWVsdmh7uWXAq7dMh0y02AaMZVyV OOw/wD+f+d+s38oSnlWi5YyWgDXM20Pifb9VyhUXq7FQKPKb8IxrtR3RA+nWnI49xgwi nSn3bNJmM5wDjBL/FYJ9Ec3U2LTD7lT4bKOF1TuEboEUAfPCti9Nc7Ui6bCBQrTnT0Tl Izd+ptvjzsk3Kpu1xjCeSfBLlYpmWGpFhWUXHHbYY0Pl7sX6KRnQ4qOtH9o7QaCUleJX 7UUA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k11si1805156pgh.132.2019.01.25.11.34.07; Fri, 25 Jan 2019 11:34:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726335AbfAYTdQ (ORCPT + 99 others); Fri, 25 Jan 2019 14:33:16 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:54854 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726311AbfAYTdP (ORCPT ); Fri, 25 Jan 2019 14:33:15 -0500 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x0PJNfGt122253 for ; Fri, 25 Jan 2019 14:33:14 -0500 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0b-001b2d01.pphosted.com with ESMTP id 2q85sn7yc0-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 25 Jan 2019 14:33:13 -0500 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 25 Jan 2019 19:33:11 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 25 Jan 2019 19:33:00 -0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x0PJWxsk39321658 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 25 Jan 2019 19:32:59 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A4230A405F; Fri, 25 Jan 2019 19:32:59 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A9233A405C; Fri, 25 Jan 2019 19:32:54 +0000 (GMT) Received: from rapoport-lnx (unknown [9.148.204.72]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Fri, 25 Jan 2019 19:32:54 +0000 (GMT) Date: Fri, 25 Jan 2019 21:32:52 +0200 From: Mike Rapoport To: Catalin Marinas Cc: linux-mm@kvack.org, Andrew Morton , Christoph Hellwig , "David S. Miller" , Dennis Zhou , Geert Uytterhoeven , Greentime Hu , Greg Kroah-Hartman , Guan Xuetao , Guo Ren , Heiko Carstens , Mark Salter , Matt Turner , Max Filippov , Michael Ellerman , Michal Simek , Paul Burton , Petr Mladek , Rich Felker , Richard Weinberger , Rob Herring , Russell King , Stafford Horne , Tony Luck , Vineet Gupta , Yoshinori Sato , devicetree@vger.kernel.org, kasan-dev@googlegroups.com, linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-um@lists.infradead.org, linux-usb@vger.kernel.org, linux-xtensa@linux-xtensa.org, linuxppc-dev@lists.ozlabs.org, openrisc@lists.librecores.org, sparclinux@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp, x86@kernel.org, xen-devel@lists.xenproject.org Subject: Re: [PATCH v2 06/21] memblock: memblock_phys_alloc_try_nid(): don't panic References: <1548057848-15136-1-git-send-email-rppt@linux.ibm.com> <1548057848-15136-7-git-send-email-rppt@linux.ibm.com> <20190125174502.GL25901@arrakis.emea.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190125174502.GL25901@arrakis.emea.arm.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-TM-AS-GCONF: 00 x-cbid: 19012519-0020-0000-0000-0000030B808E X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19012519-0021-0000-0000-0000215CC7C3 Message-Id: <20190125193252.GH31519@rapoport-lnx> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-01-25_12:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=884 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1901250151 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 25, 2019 at 05:45:02PM +0000, Catalin Marinas wrote: > On Mon, Jan 21, 2019 at 10:03:53AM +0200, Mike Rapoport wrote: > > diff --git a/arch/arm64/mm/numa.c b/arch/arm64/mm/numa.c > > index ae34e3a..2c61ea4 100644 > > --- a/arch/arm64/mm/numa.c > > +++ b/arch/arm64/mm/numa.c > > @@ -237,6 +237,10 @@ static void __init setup_node_data(int nid, u64 start_pfn, u64 end_pfn) > > pr_info("Initmem setup node %d []\n", nid); > > > > nd_pa = memblock_phys_alloc_try_nid(nd_size, SMP_CACHE_BYTES, nid); > > + if (!nd_pa) > > + panic("Cannot allocate %zu bytes for node %d data\n", > > + nd_size, nid); > > + > > nd = __va(nd_pa); > > > > /* report and initialize */ > > Does it mean that memblock_phys_alloc_try_nid() never returns valid > physical memory starting at 0? Yes, it does. memblock_find_in_range_node() that is used by all allocation methods skips the first page [1]. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/mm/memblock.c#n257 > -- > Catalin > -- Sincerely yours, Mike.