Received: by 10.213.65.68 with SMTP id h4csp632900imn; Tue, 13 Mar 2018 15:48:51 -0700 (PDT) X-Google-Smtp-Source: AG47ELvOjH9PC7AVtUL7y5SIQde1/VzxIkuTFfSEobA1iPVCVNRTJcQ4RgoBFOwbugbz/kRKjy8u X-Received: by 2002:a17:902:d81:: with SMTP id 1-v6mr1969118plv.324.1520981331743; Tue, 13 Mar 2018 15:48:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520981331; cv=none; d=google.com; s=arc-20160816; b=EC6Su8mdNkRo+vlSWw/N44+VUN//VG/f2psVXzuxUJz3Lu6eB0/oGTMUd1SAbaXb18 c4d3c98lsEjvrgz9ctA6YDyeAomMSzmSczpRNrt3tF9tL/ql7WWOJ36b11J4cb5k651I Puwjtt7PYZBp0MPC3RS1+ZJE5Ze2AzgDNqLo9Sr75jcDkr5O1lwwIAzX1XNAxUoTlhg9 nzI1gvHIDd8OfJvdy2S1xc6HY4dUd/QOzAjINkjExDz5G4ucYSkPP/MMA3WfREYH2OaA ++5b74bq5Te+qJKsFDgMG0mFz8QVEFrlK4dKUpxv6xVjojxi7iInubB8zWfd8FxFIRAx +YxA== 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=aCyIBKyyRNUSe9ab8oldzZFrWpqOcChtTWoxVqmNf7k=; b=INbdCQ5w8FuDQi8rYBTyYBxQohWpJxXftzJn1qSuqoJ6EIBJsmxI00N4JZEoS1toHV N7C6HBjmbfbzIQbdi4hEXixLr9tmn8/UGrZ2VF5AnWgWddIGLuQAJBVbv/YhpnwWtl0m O2Djr0QqbO7YffEi6iTQUVuB1stIORLEQZ19hKYDDAlZ56M/RbhYmOQUcjJuDdWgMR26 lqzwOwnhavLwv+rLcp72bDfaDa61AQWuUqCEB5/RRurphjaNBx6ukPxJ5S8mmnGGT7vo CMqABydYmyRWE78A4r7r6eM4AEjVqKT9uw/+5bzPFeUyC0x6fP0zG5eX8W6wP+QcWOjU b4KQ== 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 71-v6si865244pla.707.2018.03.13.15.48.37; Tue, 13 Mar 2018 15:48:51 -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 S932782AbeCMWrV (ORCPT + 99 others); Tue, 13 Mar 2018 18:47:21 -0400 Received: from mail-ot0-f194.google.com ([74.125.82.194]:35184 "EHLO mail-ot0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932197AbeCMWrT (ORCPT ); Tue, 13 Mar 2018 18:47:19 -0400 Received: by mail-ot0-f194.google.com with SMTP id r30-v6so1362947otr.2 for ; Tue, 13 Mar 2018 15:47:19 -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=aCyIBKyyRNUSe9ab8oldzZFrWpqOcChtTWoxVqmNf7k=; b=Maz9dfdICzAAaJnhcjsEMUd8ZvzPfa6DA5KO5DOC3jFjx+eeu7YkrNex4NtivwiAQU h1kwgzUmignW9kUWgn/X2+hL/iWKjG1O33eC0US2X3xKkrNGc+JxdE8nn8JKnlsmnsto +ReeOuemx10MW71TrdOousUSFfAcdQ3gW+dvyrRniH8e1dlZOcQ4ujmCwYSqCRdUmuaI dVnK/Wd3oCi7Z2InSYGSLGnCZv52QtTPPsr6PxX7tDsc8qrEpa4ZM7jd/HbluthAtK5x Te57fd5etYPOzRseLyF0k/+HT7GCmuK2CXIPGYFyTboMAU9FXmHkdMkmc9DFWLc9+nYx MOyA== X-Gm-Message-State: AElRT7Fon+II/InHegHAKIpzyBYcqZz8tQ457HFvUJfaR++wCoYHnKg/ RK/uDun863H05VwJxHYuLvKnQJX52q36xdBPBlbXIg== X-Received: by 10.157.56.40 with SMTP id i37mr1720190otc.197.1520981239317; Tue, 13 Mar 2018 15:47:19 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:39f6:0:0:0:0:0 with HTTP; Tue, 13 Mar 2018 15:47:18 -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: Tue, 13 Mar 2018 23:47:18 +0100 Message-ID: Subject: Re: [PATCH v3 2/2] mm/page_alloc: fix memmap_init_zone pageblock alignment To: Naresh Kamboju 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 Tue, Mar 13, 2018 at 7:34 AM, Naresh Kamboju wrote: > 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. Thank you and Sudeep for testing. I've just sent Andrew a formal patch. > > - Naresh > >> ~~~~