From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00F82C433FE for ; Sat, 5 Dec 2020 17:09:29 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 785F3230FA for ; Sat, 5 Dec 2020 17:09:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 785F3230FA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id AB29E6B005D; Sat, 5 Dec 2020 12:09:27 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A3C2D8D0002; Sat, 5 Dec 2020 12:09:27 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 905CE8D0001; Sat, 5 Dec 2020 12:09:27 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0041.hostedemail.com [216.40.44.41]) by kanga.kvack.org (Postfix) with ESMTP id 7327E6B005D for ; Sat, 5 Dec 2020 12:09:27 -0500 (EST) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 19A83362B for ; Sat, 5 Dec 2020 17:09:27 +0000 (UTC) X-FDA: 77559864774.18.songs35_561524d273ce Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin18.hostedemail.com (Postfix) with ESMTP id F27A8100ED585 for ; Sat, 5 Dec 2020 17:09:26 +0000 (UTC) X-HE-Tag: songs35_561524d273ce X-Filterd-Recvd-Size: 4622 Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) by imf38.hostedemail.com (Postfix) with ESMTP for ; Sat, 5 Dec 2020 17:09:26 +0000 (UTC) Received: by mail-lj1-f193.google.com with SMTP id f24so10219389ljk.13 for ; Sat, 05 Dec 2020 09:09:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/nONXOe+JWtgC2NEmkR8xcycTkJWCy3WRXYAibxk+2U=; b=yAzk/g0i/6/Y6AzhoKNkjYDk3qK4szrD6DsIQ4UoHDW1oA3d0TSHuu5PWZvw7Zsmlv 1dnq22xAK7TqogoAxD6fqNwYqONi097hVb9LoEARvuMt/0Hdoe+Et+w/PaHRsDWLYjyq 2HFuCynV7L5JahwqLLzju7RNQlxDwk+5z3oRFxN6EBtFtiid9xL2u27p45hrERqs8QJH C9NE1OMzdCnWWRlY75T8FanAYscof8A/ico/yDns8su9phtpAPbixulYBvCbbTEEde1q exfqh89UjkxEKfyw/cBlueCkcqxz1w1Np9sYMUzD7DNfFRUsHisFsxBQ9otWK3rjZQZk UzLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/nONXOe+JWtgC2NEmkR8xcycTkJWCy3WRXYAibxk+2U=; b=Qq+piYIPBRmBG/s8Gwumd98PfDLh3gZdmYQEme4wUcrIDspvubkVn0tD16uL9pInFR IVx5WWqNgsBf0c6axOyNs2ctKahz+A4gf2Zu+ZLVXY5+9gKshvZntY2jmLfhFwdOJBrE CoXkqbnUgxgMCw07mbEEn3CCg6jKF7w/qD7QZc08yn7qlmLzJbGTs/NsSSfaamH0hF6F jr5fy0l2IXz/cc/yJYA8/O7ZOpU0xrllg/bZ2z/3MuOR/4U+JTQu2SufZYEpFrspa+1u u2SkKYcnRqsNSA+/a4yBkew0tXF3C6tIKSa+75S524ntBwC6LHsCl3M5N8Bz2JJxErbH +QCw== X-Gm-Message-State: AOAM533ZmD68jghrWmBHEp2r50w7uKWkMP7LwJ9L7jQgvGl8TX/LuQ1g UfJVpTQiG3wQ29Pr+aplHnVJA0/rpbJzgmOWSOwh6Q== X-Google-Smtp-Source: ABdhPJxoqecW7LxgD0r1nAG22AfBGr3ZG5mFYrc/nZRyjVvcls3d0uOXjvm1Adw1hkBjXMOIspeSVTJhjTpxwyiPGp8= X-Received: by 2002:a05:651c:112e:: with SMTP id e14mr5724965ljo.388.1607188164947; Sat, 05 Dec 2020 09:09:24 -0800 (PST) MIME-Version: 1.0 References: <20201203152311.5272-1-carver4lio@163.com> <3d709122-0364-5bca-9247-3f212096b389@nvidia.com> In-Reply-To: <3d709122-0364-5bca-9247-3f212096b389@nvidia.com> From: Anders Roxell Date: Sat, 5 Dec 2020 18:09:14 +0100 Message-ID: Subject: Re: [PATCH] mm/memblock:use a more appropriate order calculation when free memblock pages To: Jon Hunter Cc: Marek Szyprowski , Qian Cai , carver4lio@163.com, rppt@kernel.org, Andrew Morton , Linux-MM , Linux Kernel Mailing List , Hailong Liu , Stephen Rothwell , Linux Next Mailing List , Bartlomiej Zolnierkiewicz , linux-tegra Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, 4 Dec 2020 at 18:44, Jon Hunter wrote: > > > On 04/12/2020 16:07, Marek Szyprowski wrote: > > Hi All, > > > > On 04.12.2020 14:42, Qian Cai wrote: > >> On Thu, 2020-12-03 at 23:23 +0800, carver4lio@163.com wrote: > >>> From: Hailong Liu > >>> > >>> When system in the booting stage, pages span from [start, end] of a memblock > >>> are freed to buddy in a order as large as possible (less than MAX_ORDER) at > >>> first, then decrease gradually to a proper order(less than end) in a loop. > >>> > >>> However, *min(MAX_ORDER - 1UL, __ffs(start))* can not get the largest order > >>> in some cases. > >>> Instead, *__ffs(end - start)* may be more appropriate and meaningful. > >>> > >>> Signed-off-by: Hailong Liu > >> Reverting this commit on the top of today's linux-next fixed boot crashes on > >> multiple NUMA systems. > > > > I confirm. Reverting commit 4df001639c84 ("mm/memblock: use a more > > appropriate order calculation when free memblock pages") on top of linux > > next-20201204 fixed booting of my ARM32bit test systems. > > > FWIW, I also confirm that this is causing several 32-bit Tegra platforms > to crash on boot and reverting this fixes the problem. I had the same experience on an arm64 system. Cheers, Anders