Received: by 10.213.65.68 with SMTP id h4csp170785imn; Mon, 12 Mar 2018 23:36:04 -0700 (PDT) X-Google-Smtp-Source: AG47ELt6X2U/XOE6oQ/YDl1YrmTXoVv5T08QTTNNcmQnt5rRarxxou0O2qjZq+UrdcUDcJJP+q2N X-Received: by 10.98.69.196 with SMTP id n65mr10651047pfi.29.1520922964160; Mon, 12 Mar 2018 23:36:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520922964; cv=none; d=google.com; s=arc-20160816; b=Me690+oNyC4gLDT1Qn6boNbNRY47wdfMBEYBbizzWTY45oIhahF4IMBlp1Wu5lUJAm 51vpg2N1iktbeKtoSzAizM6reaE5wiB1RlxGSTPdxx1ipBKiO6IUIbBUoIOXsjYueBiS E9uKVqMHmamwBcz5X2O0DByGYyB7mJtsFoKEgTn8uqLkB6KdxjnT5fB9ftFogf4Co2lw NRFYExh35HTFiGi6DrRlIwhsA3IPLgmDxeaPEosF3jQURG+cHEeHHwiVmfH38kyBZ9DV qbiKHHohfLv0frLcHeoCvAd12cTyM2zNsMjLgSiDfARd5pkMIuqhzv6SX12SNR8jz1jx 6UcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=PfS6zrkg9i87fR8dKLgXz6vGVg4mvcb4G0tJLdKJ04c=; b=Cw67mxXg2Wl/WBYlseNtHpzxaCd2BLJSR/Cf1dhbS6eEtQ7TbucWz58W3xoJipkHKK HLOmTlXUPUztXghw0aeTP/0wGc/QJJofIaQ7llenlSsMVaqGL24XChtWSYj4mXl/9XCU 1xYR7ogyNww38yJonMRQ2/K/5tL0ZAjhfp9RlAgcOWvoyC4BUqebtJqRWQq9NvJSLHGK iAYqKQVu+08KD6HjEjeFncVxYWxEwKEEWdL4783tR9z3NNZZRRozTEYN67hHLoDSWGLs GX2cYh+y71shbsW65+vLMV9NkbFA0CNpy1T1Ijv/xMDK25KkUIIQOEOkU6PGLemLr27i HvHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QUGrSX0l; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g1si4740964pge.636.2018.03.12.23.35.49; Mon, 12 Mar 2018 23:36:04 -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; dkim=pass header.i=@linaro.org header.s=google header.b=QUGrSX0l; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751769AbeCMGet (ORCPT + 99 others); Tue, 13 Mar 2018 02:34:49 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:43515 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751483AbeCMGer (ORCPT ); Tue, 13 Mar 2018 02:34:47 -0400 Received: by mail-lf0-f65.google.com with SMTP id q69-v6so26939953lfi.10 for ; Mon, 12 Mar 2018 23:34:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=PfS6zrkg9i87fR8dKLgXz6vGVg4mvcb4G0tJLdKJ04c=; b=QUGrSX0lXlcmZtqt3CF+uQcNTfPI0+7NNBl1P+yT1DPWEmW4og9PnPcIDxrjTB88AF eQN8rwyriiX7MOP25Qk30dqs97e7+1aey0arozwXaH2kzY5w41yEdCRD8CcUixi19N1d UaCApFhGWw2u8JZD0GogD15XYq1PHPDr4LF+c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=PfS6zrkg9i87fR8dKLgXz6vGVg4mvcb4G0tJLdKJ04c=; b=WsgjuC5b5FxSeS6dkli9Twyyq3adWTbcIcJMRalAUF+3J/UtUrhCi9bhskzN3QlW/N nCvgNDfjsaVjsc9dMjP9K3sPefju0ArIjXyIWjiVWzoyIbubsHY81FuOa6e6XvO+w5I5 WrJS8OVfCVwN0kVQPcaxwecIhmLdzpgCNZe7Cx4c3QNjnQ3PVxXYImQ7cWqVsSlh7zwz ZabQhalsJpx1KMReVOMHJqvq6lgQ9MvSYTok1uHoX/rA0Ieww29szhfX3RA1vh8wN6iN /SrBbWwp+suVNFUytneeoJII3u6DqH/eSOT1QKmc/vWjXUtK0mf06kGB5LGbpaxnj4rg NHEQ== X-Gm-Message-State: AElRT7FaUjrcrNer1Cb3Nj3IGpSbCGEwKeaNHzPyTZhJCxGBwZ8ow4D/ WBjdceWkL2qzQbO3k1x1C41mVyxTY/Up91oiXQ5qlOftNZo= X-Received: by 10.46.53.23 with SMTP id z23mr7416671ljz.113.1520922885967; Mon, 12 Mar 2018 23:34:45 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a19:4807:0:0:0:0:0 with HTTP; Mon, 12 Mar 2018 23:34:45 -0700 (PDT) In-Reply-To: References: <1519908465-12328-1-git-send-email-neelx@redhat.com> <0485727b2e82da7efbce5f6ba42524b429d0391a.1520011945.git.neelx@redhat.com> <20180302164052.5eea1b896e3a7125d1e1f23a@linux-foundation.org> From: Naresh Kamboju Date: Tue, 13 Mar 2018 12:04:45 +0530 Message-ID: Subject: Re: [PATCH v3 2/2] mm/page_alloc: fix memmap_init_zone pageblock alignment To: Daniel Vacek Cc: Sudeep Holla , Andrew Morton , open list , linux-mm@kvack.org, Michal Hocko , Vlastimil Babka , Mel Gorman , Pavel Tatashin , Paul Burton , linux- stable Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12 March 2018 at 22:21, Daniel Vacek wrote: > On Mon, Mar 12, 2018 at 3:49 PM, Naresh Kamboju > wrote: >> On 12 March 2018 at 17:56, Sudeep Holla wrote: >>> Hi, >>> >>> I couldn't find the exact mail corresponding to the patch merged in v4.16-rc5 >>> but commit 864b75f9d6b01 "mm/page_alloc: fix memmap_init_zone >>> pageblock alignment" >>> cause boot hang on my ARM64 platform. >> >> I have also noticed this problem on hi6220 Hikey - arm64. >> >> LKFT: linux-next: Hikey boot failed linux-next-20180308 >> https://bugs.linaro.org/show_bug.cgi?id=3676 >> >> - Naresh >> >>> >>> Log: >>> [ 0.000000] NUMA: No NUMA configuration found >>> [ 0.000000] NUMA: Faking a node at [mem >>> 0x0000000000000000-0x00000009ffffffff] >>> [ 0.000000] NUMA: NODE_DATA [mem 0x9fffcb480-0x9fffccf7f] >>> [ 0.000000] Zone ranges: >>> [ 0.000000] DMA32 [mem 0x0000000080000000-0x00000000ffffffff] >>> [ 0.000000] Normal [mem 0x0000000100000000-0x00000009ffffffff] >>> [ 0.000000] Movable zone start for each node >>> [ 0.000000] Early memory node ranges >>> [ 0.000000] node 0: [mem 0x0000000080000000-0x00000000f8f9afff] >>> [ 0.000000] node 0: [mem 0x00000000f8f9b000-0x00000000f908ffff] >>> [ 0.000000] node 0: [mem 0x00000000f9090000-0x00000000f914ffff] >>> [ 0.000000] node 0: [mem 0x00000000f9150000-0x00000000f920ffff] >>> [ 0.000000] node 0: [mem 0x00000000f9210000-0x00000000f922ffff] >>> [ 0.000000] node 0: [mem 0x00000000f9230000-0x00000000f95bffff] >>> [ 0.000000] node 0: [mem 0x00000000f95c0000-0x00000000fe58ffff] >>> [ 0.000000] node 0: [mem 0x00000000fe590000-0x00000000fe5cffff] >>> [ 0.000000] node 0: [mem 0x00000000fe5d0000-0x00000000fe5dffff] >>> [ 0.000000] node 0: [mem 0x00000000fe5e0000-0x00000000fe62ffff] >>> [ 0.000000] node 0: [mem 0x00000000fe630000-0x00000000feffffff] >>> [ 0.000000] node 0: [mem 0x0000000880000000-0x00000009ffffffff] >>> [ 0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000009ffffffff] >>> >>> On Sat, Mar 3, 2018 at 1:08 AM, Daniel Vacek wrote: >>>> On Sat, Mar 3, 2018 at 1:40 AM, Andrew Morton wrote: >>>>> >>>>> This makes me wonder whether a -stable backport is really needed... >>>> >>>> For some machines it definitely is. Won't hurt either, IMHO. >>>> >>>> --nX > > Hmm, does it step back perhaps? > > Can you check if below cures the boot hang? > > --nX > > ~~~~ > neelx@metal:~/nX/src/linux$ git diff > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index 3d974cb2a1a1..415571120bbd 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -5365,8 +5365,10 @@ void __meminit memmap_init_zone(unsigned long > size, int nid, unsigned long zone, > * the valid region but still depends on correct page > * metadata. > */ > - pfn = (memblock_next_valid_pfn(pfn, end_pfn) & > + unsigned long next_pfn; > + next_pfn = (memblock_next_valid_pfn(pfn, end_pfn) & > ~(pageblock_nr_pages-1)) - 1; > + pfn = max(next_pfn, pfn); > #endif > continue; > } After applying this patch on linux-next the boot hang problem resolved. Now the hi6220-hikey is booting successfully. Thank you. - Naresh > ~~~~