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=-5.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 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 F0468C38A2A for ; Mon, 11 May 2020 01:21:20 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 848F52082E for ; Mon, 11 May 2020 01:21:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="acPnJQtB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 848F52082E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CA2378E001B; Sun, 10 May 2020 21:21:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C526D8E0001; Sun, 10 May 2020 21:21:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B40488E001B; Sun, 10 May 2020 21:21:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0103.hostedemail.com [216.40.44.103]) by kanga.kvack.org (Postfix) with ESMTP id 9AAB68E0001 for ; Sun, 10 May 2020 21:21:19 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 53845180AD80F for ; Mon, 11 May 2020 01:21:19 +0000 (UTC) X-FDA: 76802685078.08.air03_b73ef6133d58 X-HE-Tag: air03_b73ef6133d58 X-Filterd-Recvd-Size: 4547 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by imf03.hostedemail.com (Postfix) with ESMTP for ; Mon, 11 May 2020 01:21:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589160078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XpPUF4Lpte5er2Ch71QCy11te1/+/YJzd/wxHcmocTg=; b=acPnJQtB1xmQcItnPRgfO3iaOJ0PhKE5EGlxj/GNY7zc5/KE+NTnyUixwKzZeFaDg+zEUC ceBcOCJNhSb4oogSdS2UiwvMIWN+M76ep5RryfXdo8SnBVkqFx3ngin44g0X/UA4fzoT5P saVwmav03eCDX0GPNTWe5ZFJ8cpNTs8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-416-aRhFNX5KNKObKy9zYJ2tGw-1; Sun, 10 May 2020 21:21:14 -0400 X-MC-Unique: aRhFNX5KNKObKy9zYJ2tGw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4591A80058A; Mon, 11 May 2020 01:21:12 +0000 (UTC) Received: from localhost (ovpn-12-129.pek2.redhat.com [10.72.12.129]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 930026062D; Mon, 11 May 2020 01:21:07 +0000 (UTC) Date: Mon, 11 May 2020 09:21:00 +0800 From: Baoquan He To: Qian Cai Cc: Mel Gorman , Vlastimil Babka , Michal Hocko , David Hildenbrand , Linux-MM , LKML , Mike Rapoport Subject: Re: compaction: VM_BUG_ON_PAGE(!zone_spans_pfn(page_zone(page), pfn)) Message-ID: <20200511012100.GI5029@MiWiFi-R3L-srv> References: <8C537EB7-85EE-4DCF-943E-3CC0ED0DF56D@lca.pw> <20200424034353.GD4247@MiWiFi-R3L-srv> <20200505124314.GA5029@MiWiFi-R3L-srv> <46D27820-4B67-45F0-898C-B0547D654626@lca.pw> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <46D27820-4B67-45F0-898C-B0547D654626@lca.pw> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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 05/05/20 at 09:20am, Qian Cai wrote: >=20 >=20 > > On May 5, 2020, at 8:43 AM, Baoquan He wrote: > >=20 > > Hi, > >=20 > > On 04/24/20 at 09:45am, Qian Cai wrote: > >>=20 > >>=20 > >>> On Apr 23, 2020, at 11:43 PM, Baoquan He wrote: > >>>=20 > >>> On 04/23/20 at 05:25pm, Qian Cai wrote: > >>>> Compaction starts to crash below on linux-next today. The faulty p= age belongs to Node 0 DMA32 zone. > >>>> I=E2=80=99ll continue to narrow it down, but just want to give a h= eadup in case someone could beat me to it. > >>>>=20 > >>>> Debug output from free_area_init_core() > >>>> [ 0.000000] KK start page =3D ffffea0000000040, end page =3D ff= ffea0000040000, nid =3D 0 DMA > >>>> [ 0.000000] KK start page =3D ffffea0000040000, end page =3D ff= ffea0004000000, nid =3D 0 DMA32 > >>>> [ 0.000000] KK start page =3D ffffea0004000000, end page =3D ff= ffea0012000000, nid =3D 0 NORMAL > >>>> [ 0.000000] KK start page =3D ffffea0012000000, end page =3D ff= ffea0021fc0000, nid =3D 4 NORMAL > >>>=20 > >>> Where are these printed? They are the direct mapping address of pag= e? > >>=20 > >> From this debug patch. Yes, direct mapping. > >=20 > > Can you try below patch? I may get why this is caused, not sure if th= e > > place is right.=20 > >=20 > > diff --git a/mm/compaction.c b/mm/compaction.c > > index 177c11a8f3b9..e26972f26414 100644 > > --- a/mm/compaction.c > > +++ b/mm/compaction.c > > @@ -1409,7 +1409,9 @@ fast_isolate_freepages(struct compact_control *= cc) > > cc->free_pfn =3D highest; > > } else { > > if (cc->direct_compaction && pfn_valid(min_pfn)) { > > - page =3D pfn_to_page(min_pfn); > > + page =3D pageblock_pfn_to_page(min_pfn, > > + pageblock_end_pfn(min_pfn), > > + cc->zone); > > cc->free_pfn =3D min_pfn; > > } > > } >=20 > I have not had luck to reproduce this again yet, but feel free to move = forward with the patch anyway if you are comfortable to do so, so at leas= t people could review it properly. OK, I will make a patch with details in log and post. Thanks.