Received: by 10.213.65.68 with SMTP id h4csp162981imn; Mon, 12 Mar 2018 09:52:41 -0700 (PDT) X-Google-Smtp-Source: AG47ELtW36zkVpzRR+vyogXHy6iqGaLrPIGQ6olCr1aXuzas365BBpeHkW3KjozHqjbG0FJ8HAM0 X-Received: by 10.99.125.19 with SMTP id y19mr1482785pgc.125.1520873561283; Mon, 12 Mar 2018 09:52:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520873561; cv=none; d=google.com; s=arc-20160816; b=VL4JNnIsH4CroQmb58ETEYSrfsTyVVItzXIX5rCVFJ+hOPOo937S1McGj73hWGgRtP Mwb24tK0fm29EFUKBIL7QXskKm2fqUjlBOxzzrkYeJURNQkBJknLFhR4AEji2pxGSXuh F8XgjjLlcikLrjVnv4ovXnJg1XM+iO7Rel5VYUcKHz9kf0MQV36XKRXV6egy/kkUxTLm KiNOdonqaNAhXGR11orNyfm5jLT3UvGy0OrSRSwUE/1dTeMm7a0P0fjW4VFw3PsrBSaN B0xfiKv2JtQsIZ9gpDxqa/aTJIF+zz69QoiUjJySmq0lPF+LLdTEbAAFE/q8ZcGYGUkS xFgA== 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:arc-authentication-results; bh=Qm7A+4hp/nzsJMbICglEkPCEp0rJfJtDiB0EwnP5X5U=; b=QMRBHWw3/YbtUAwDZGfsCOprNALLnoipMHOex+sXV7AE5FqGu6bEHaADt59VUF+r/R hCo/5UXU0M5qEWAvF0HnxhhpTAr3WtFEvBvMww2YYaK4PJaGoFRqsE+PulNwNZMAzYoE fSCfV9hyV40Adt5ppIZaHQDpXwZsaKiNdEZS7RApLS43GiJj4G06bYhfRdQRZfQo8BO5 7e+pKkn3+pfjLtojY2CngSrDPksZ2EsGtKd606xkJIX6EGWs12yEdlcZLM2W6kv9PDpt NiC8DrFgcs3CKRnNPhmkTluR1xtkKYm/bWXjp3xX9yct2NNTSQwcRCrNw/tD90mO5xwo 0xgg== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z2si5222993pgo.720.2018.03.12.09.52.25; Mon, 12 Mar 2018 09:52:41 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932600AbeCLQvK (ORCPT + 99 others); Mon, 12 Mar 2018 12:51:10 -0400 Received: from mail-ot0-f193.google.com ([74.125.82.193]:36613 "EHLO mail-ot0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932580AbeCLQvI (ORCPT ); Mon, 12 Mar 2018 12:51:08 -0400 Received: by mail-ot0-f193.google.com with SMTP id 108so15967532otv.3 for ; Mon, 12 Mar 2018 09:51:08 -0700 (PDT) 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=Qm7A+4hp/nzsJMbICglEkPCEp0rJfJtDiB0EwnP5X5U=; b=ZgE1NqtIB6LnM0aM0TgNWsaRJl/64MqMem9DHer63ffgYLvxz+jg/fC3OabPTQ0wqb VPOOliz3B38Y2nIzGhagck7b0DHAsCZXNP5Iqt3dYSpv+hm85yOX2EVEXLWaVsMiPi2l omL7DEJIxr3ybNaeKvaUWY9w1MLDP05Q1B468CNx3+YPiHuOC+4x2jio+ahi3EDoqLXP Xwb7duVwCkySys8+5s82ZoEt4JScjeGLx8Rbjyeh0pLVv7onJy8+vV6vOGalEoth47Kh A8diHAaBSB3623vr9cPIrmgsA4cg9qWKyW/twbPl1H4iKSSs3YYe4IS1sUEWtzLYbBno XLzw== X-Gm-Message-State: AElRT7HxzkdA0jK7VV69RN76tE4nHLms6A1VH6Qcm/wZqvTMx74aOnpT uaa19KJrUcOsfA36HlFKd1h6Au8/82ygPz0viZhY3g== X-Received: by 10.157.22.144 with SMTP id c16mr5624282ote.326.1520873467756; Mon, 12 Mar 2018 09:51:07 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:39f6:0:0:0:0:0 with HTTP; Mon, 12 Mar 2018 09:51:07 -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: Daniel Vacek Date: Mon, 12 Mar 2018 17:51:07 +0100 Message-ID: Subject: Re: [PATCH v3 2/2] mm/page_alloc: fix memmap_init_zone pageblock alignment To: Sudeep Holla , Naresh Kamboju Cc: 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 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; } ~~~~