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=-8.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 5DDFDC433ED for ; Thu, 29 Apr 2021 06:58:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id ACA5D61449 for ; Thu, 29 Apr 2021 06:58:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ACA5D61449 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1F8C36B006C; Thu, 29 Apr 2021 02:58:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 183646B006E; Thu, 29 Apr 2021 02:58:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F3E466B0070; Thu, 29 Apr 2021 02:58:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0171.hostedemail.com [216.40.44.171]) by kanga.kvack.org (Postfix) with ESMTP id D38F36B006C for ; Thu, 29 Apr 2021 02:58:05 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 8BF3A1801C399 for ; Thu, 29 Apr 2021 06:58:05 +0000 (UTC) X-FDA: 78084500130.26.B8E03C1 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf06.hostedemail.com (Postfix) with ESMTP id D660EC0007DA for ; Thu, 29 Apr 2021 06:58:07 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id BAD7A6144B; Thu, 29 Apr 2021 06:57:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1619679483; bh=l1YNoSMCv4WqRE2vuNJAwrTs3h6UQBEivHBC6/hQdn4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aO7gxyhOVkLEx+raw89h1VPcYXGHTfGyqvHsdHo+ICI31y241io5QGGPJR12RCD/p 8AV8o5ax3nhSce+p3MiYHZSHqQ3/x1PJX8BN+6vIYtKheOallgAVi/YfSh3X7TEeB6 hjyaQyhwr1wfIx38apMX8lqS4GMc67eRdUkGB7x35fhWcDz6Fqm+yi56m8gChW4baP JKP9TA+UXsJKV0urjwKkeiV01FoQLOC2yqnzM0MqCY6C8bKYb1LBHxDpS0R9BsOMdw QP6NufksB+r1kxa/ucqzUL74NkyIi/gXA3Je3MbkdY2i2jyKJ9umoNjuWeNLy8ChHy yO1oOEtaPufSA== Date: Thu, 29 Apr 2021 09:57:53 +0300 From: Mike Rapoport To: Kefeng Wang Cc: linux-arm-kernel@lists.infradead.org, Andrew Morton , Anshuman Khandual , Ard Biesheuvel , Catalin Marinas , David Hildenbrand , Marc Zyngier , Mark Rutland , Mike Rapoport , Will Deacon , kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: arm32: panic in move_freepages (Was [PATCH v2 0/4] arm64: drop pfn_valid_within() and simplify pfn_valid()) Message-ID: References: <33fa74c2-f32d-f224-eb30-acdb717179ff@huawei.com> <2a1592ad-bc9d-4664-fd19-f7448a37edc0@huawei.com> <52f7d03b-7219-46bc-c62d-b976bc31ebd5@huawei.com> <2d879629-3059-fd42-428f-4b7c2a73d698@huawei.com> <259d14df-a713-72e7-4ccb-c06a8ee31e13@huawei.com> <6ad2956c-70ae-c423-ed7d-88e94c88060f@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <6ad2956c-70ae-c423-ed7d-88e94c88060f@huawei.com> X-Stat-Signature: nysgnub1fkxbca53gqq674j51cismspy X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: D660EC0007DA Received-SPF: none (kernel.org>: No applicable sender policy available) receiver=imf06; identity=mailfrom; envelope-from=""; helo=mail.kernel.org; client-ip=198.145.29.99 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1619679487-982668 Content-Transfer-Encoding: quoted-printable 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 Thu, Apr 29, 2021 at 08:48:26AM +0800, Kefeng Wang wrote: >=20 > On 2021/4/28 13:59, Mike Rapoport wrote: > > On Tue, Apr 27, 2021 at 07:08:59PM +0800, Kefeng Wang wrote: > > > On 2021/4/27 14:23, Mike Rapoport wrote: > > > > On Mon, Apr 26, 2021 at 11:26:38PM +0800, Kefeng Wang wrote: > > > > > On 2021/4/26 13:20, Mike Rapoport wrote: > > > > > > On Sun, Apr 25, 2021 at 03:51:56PM +0800, Kefeng Wang wrote: > > > > > > > On 2021/4/25 15:19, Mike Rapoport wrote: > > > > > > >=20 > > > > > > > On Fri, Apr 23, 2021 at 04:11:16PM +0800, Kefeng Wan= g wrote: > > > > > > >=20 > > > > > > > I tested this patchset(plus arm32 change, like a= rm64 does) > > > > > > > based on lts 5.10=EF=BC=8Cadd some debug log, th= e useful info shows > > > > > > > below, if we enable HOLES_IN_ZONE, no panic, any= idea, > > > > > > > thanks. > > > > > > >=20 > > > > > > > Are there any changes on top of 5.10 except for pfn_= valid() patch? > > > > > > > Do you see this panic on 5.10 without the changes? > > > > > > >=20 > > > > > > > Yes, there are some BSP support for arm board based on 5.10= , > > > > Is it possible to test 5.12? > > Do you use SPARSMEM? If yes, what is your section size? > > What is the value if CONFIG_FORCE_MAX_ZONEORDER in your configuration= ? >=20 > Yes, >=20 > CONFIG_SPARSEMEM=3Dy >=20 > CONFIG_SPARSEMEM_STATIC=3Dy >=20 > CONFIG_FORCE_MAX_ZONEORDER =3D 11 >=20 > CONFIG_PAGE_OFFSET=3D0xC0000000 > CONFIG_HAVE_ARCH_PFN_VALID=3Dy > CONFIG_HIGHMEM=3Dy > #define SECTION_SIZE_BITS 26 > #define MAX_PHYSADDR_BITS 32 > #define MAX_PHYSMEM_BITS 32 It seems that with SPARSEMEM we don't align the freed parts on pageblock boundaries. Can you try the patch below: diff --git a/mm/memblock.c b/mm/memblock.c index afaefa8fc6ab..1926369b52ec 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -1941,14 +1941,13 @@ static void __init free_unused_memmap(void) * due to SPARSEMEM sections which aren't present. */ start =3D min(start, ALIGN(prev_end, PAGES_PER_SECTION)); -#else +#endif /* * Align down here since the VM subsystem insists that the * memmap entries are valid from the bank start aligned to * MAX_ORDER_NR_PAGES. */ start =3D round_down(start, MAX_ORDER_NR_PAGES); -#endif =20 /* * If we had a previous bank, and there is a space =20 --=20 Sincerely yours, Mike.