Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp766691imm; Wed, 4 Jul 2018 05:45:01 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd6boZ2rE3CtBno2hrA0LdAIAMRFqzbQ6nP0s0nCs2t5rMPLpz3IAyulD+Q10KUJt4oG0T0 X-Received: by 2002:a62:990f:: with SMTP id d15-v6mr2059167pfe.162.1530708301885; Wed, 04 Jul 2018 05:45:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530708301; cv=none; d=google.com; s=arc-20160816; b=ZaJ4G3O+hb6AUwJ62l3/nBRn4QQW3RJ6OBb6JLbXu21CIbPyv6m+eL14MUqNqGmULM 41QZbvH1aAd91PhHYOsS2EhIAJCuvObncUzM7sMmpHKmCsftJkNM2LmVzlk1+wIgcPOm ISCLIiNwtmWdd6subzRs6lDdXmEoIBMAuNH1i1VLMINuCz19DUzOkOw2gGs+UGEMcj+i xzHZLuWSALJ19sByIOvg1SRxztWUKyPS9UJy//qBWb73jVEP0Lz82u9LvfzsOHzD/0H5 S4DkapxOdi/h4hPNnybygZ/nvXvqcIM2YVpKOzGHGER/i+wym+ZpC2/+1eCNLNA+YuaT zLuw== 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 :arc-authentication-results; bh=LgXAsA0bh0KaJZR7aNtIbWyCnbPZCNWob+wRESka8CM=; b=ZKik9BIBSRChPKeMM/Ia8WvjNfzLS1EBeg4bFsmgdznA9cbMBdnegzFGig1NJzL8Cn dSVLQKtsTRIrR7p2wjFOCRZFY4HvUfBlfdtBF5BjttQ65uH5iwy94g5GB9NHbVQcD5+J KAQ7tEzpMF7djb/jcsEDtVNDzHyxh/MvSDagyhXgRetB5JlPVq6+9KNa3XpOJz0doGE8 PQ2XGGF49IxSwh0RzSbDFI0vzqEBgAQP3T9+HgvM6f+G0QU0PRZctj04dJrWPxCUy7pY xikGAyMSUTgUSGj1DF5gK7AUw9OAkV7V/HajJnWJHbAHbltSKZ6t0JHhKWg+ioGuTnlr f21w== 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 w15-v6si3495589plq.455.2018.07.04.05.44.47; Wed, 04 Jul 2018 05:45:01 -0700 (PDT) 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 S934909AbeGDMnq (ORCPT + 99 others); Wed, 4 Jul 2018 08:43:46 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:42440 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934596AbeGDMnn (ORCPT ); Wed, 4 Jul 2018 08:43:43 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w64ChWLc020789 for ; Wed, 4 Jul 2018 08:43:43 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0b-001b2d01.pphosted.com with ESMTP id 2k0uupev3b-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 04 Jul 2018 08:43:43 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 4 Jul 2018 13:43:41 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) 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) Wed, 4 Jul 2018 13:43:38 +0100 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w64Chb7I39125156 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 4 Jul 2018 12:43:38 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 09F5811C04C; Wed, 4 Jul 2018 15:44:03 +0100 (BST) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5C18A11C04A; Wed, 4 Jul 2018 15:44:02 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.8.160]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Wed, 4 Jul 2018 15:44:02 +0100 (BST) Date: Wed, 4 Jul 2018 15:43:35 +0300 From: Mike Rapoport To: Michal Hocko Cc: Vlastimil Babka , Geert Uytterhoeven , Greg Ungerer , Sam Creasey , linux-m68k , Linux MM , Linux Kernel Mailing List Subject: Re: [PATCH v2 3/3] m68k: switch to MEMBLOCK + NO_BOOTMEM References: <1530685696-14672-1-git-send-email-rppt@linux.vnet.ibm.com> <1530685696-14672-4-git-send-email-rppt@linux.vnet.ibm.com> <20180704075410.GF22503@dhcp22.suse.cz> <89f48f7a-6cbf-ac9a-cacc-cd3ca79f8c66@suse.cz> <20180704123627.GM22503@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180704123627.GM22503@dhcp22.suse.cz> User-Agent: Mutt/1.5.24 (2015-08-30) X-TM-AS-GCONF: 00 x-cbid: 18070412-0020-0000-0000-000002A30700 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18070412-0021-0000-0000-000020EF276B Message-Id: <20180704124335.GE4352@rapoport-lnx> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-04_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=997 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807040147 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 04, 2018 at 02:36:27PM +0200, Michal Hocko wrote: > [CC Andrew - email thread starts > http://lkml.kernel.org/r/1530685696-14672-1-git-send-email-rppt@linux.vnet.ibm.com] > > OK, so here we go with the full patch. > > From 0e8432b875d98a7a0d3f757fce2caa8d16a8de15 Mon Sep 17 00:00:00 2001 > From: Michal Hocko > Date: Wed, 4 Jul 2018 14:31:46 +0200 > Subject: [PATCH] memblock: do not complain about top-down allocations for > !MEMORY_HOTREMOVE > > Mike Rapoport is converting architectures from bootmem to noboodmem > allocator. While doing so for m68k Geert has noticed that he gets > a scary looking warning > WARNING: CPU: 0 PID: 0 at mm/memblock.c:230 > memblock_find_in_range_node+0x11c/0x1be > memblock: bottom-up allocation failed, memory hotunplug may be affected > Modules linked in: > CPU: 0 PID: 0 Comm: swapper Not tainted > 4.18.0-rc3-atari-01343-gf2fb5f2e09a97a3c-dirty #7 > Stack from 003c3e20: > 003c3e20 0039cf44 00023800 00433000 ffffffff 00001000 00240000 000238aa > 00378734 000000e6 004285ac 00000009 00000000 003c3e58 003787c0 003c3e74 > 003c3ea4 004285ac 00378734 000000e6 003787c0 00000000 00000000 00000001 > 00000000 00000010 00000000 00428490 003e3856 ffffffff ffffffff 003c3ed0 > 00044620 003c3ee0 00417a10 00240000 00000010 00000000 00000000 00000001 > 00000000 00000001 00240000 00000000 00000000 00000000 00001000 003e3856 > Call Trace: [<00023800>] __warn+0xa8/0xc2 > [<00001000>] kernel_pg_dir+0x0/0x1000 > [<00240000>] netdev_lower_get_next+0x2/0x22 > [<000238aa>] warn_slowpath_fmt+0x2e/0x36 > [<004285ac>] memblock_find_in_range_node+0x11c/0x1be > [<004285ac>] memblock_find_in_range_node+0x11c/0x1be > [<00428490>] memblock_find_in_range_node+0x0/0x1be > [<00044620>] vprintk_func+0x66/0x6e > [<00417a10>] memblock_virt_alloc_internal+0xd0/0x156 > [<00240000>] netdev_lower_get_next+0x2/0x22 > [<00240000>] netdev_lower_get_next+0x2/0x22 > [<00001000>] kernel_pg_dir+0x0/0x1000 > [<00417b8c>] memblock_virt_alloc_try_nid_nopanic+0x58/0x7a > [<00240000>] netdev_lower_get_next+0x2/0x22 > [<00001000>] kernel_pg_dir+0x0/0x1000 > [<00001000>] kernel_pg_dir+0x0/0x1000 > [<00010000>] EXPTBL+0x234/0x400 > [<00010000>] EXPTBL+0x234/0x400 > [<002f3644>] alloc_node_mem_map+0x4a/0x66 > [<00240000>] netdev_lower_get_next+0x2/0x22 > [<004155ca>] free_area_init_node+0xe2/0x29e > [<00010000>] EXPTBL+0x234/0x400 > [<00411392>] paging_init+0x430/0x462 > [<00001000>] kernel_pg_dir+0x0/0x1000 > [<000427cc>] printk+0x0/0x1a > [<00010000>] EXPTBL+0x234/0x400 > [<0041084c>] setup_arch+0x1b8/0x22c > [<0040e020>] start_kernel+0x4a/0x40a > [<0040d344>] _sinittext+0x344/0x9e8 > > The warning is basically saying that a top-down allocation can break > memory hotremove because memblock allocation is not movable. But m68k > doesn't even support MEMORY_HOTREMOVE is there is no point to warn > about it. > > Make the warning conditional only to configurations that care. > > Reported-by: Geert Uytterhoeven > Tested-by: Geert Uytterhoeven > Signed-off-by: Michal Hocko > --- > mm/memblock.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/mm/memblock.c b/mm/memblock.c > index 03d48d8835ba..2acec4033389 100644 > --- a/mm/memblock.c > +++ b/mm/memblock.c > @@ -227,7 +227,8 @@ phys_addr_t __init_memblock memblock_find_in_range_node(phys_addr_t size, > * so we use WARN_ONCE() here to see the stack trace if > * fail happens. > */ > - WARN_ONCE(1, "memblock: bottom-up allocation failed, memory hotunplug may be affected\n"); > + WARN_ONCE(IS_ENABLED(CONFIG_MEMORY_HOTREMOVE), > + "memblock: bottom-up allocation failed, memory hotremove may be affected\n"); nit: isn't the warning indented too much? > } > > return __memblock_find_range_top_down(start, end, size, align, nid, > -- > 2.18.0 > > -- > Michal Hocko > SUSE Labs > -- Sincerely yours, Mike.