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=-11.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 887FBC433E6 for ; Tue, 5 Jan 2021 18:47:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 49A2F22D71 for ; Tue, 5 Jan 2021 18:47:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730255AbhAESrQ (ORCPT ); Tue, 5 Jan 2021 13:47:16 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:54815 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730078AbhAESrP (ORCPT ); Tue, 5 Jan 2021 13:47:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1609872348; 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=K1TAF9Fcst8dyNOllX1PJEA1E2V0hS7RDbI5Vu/KXE0=; b=bBL++o8Te4n40lZO83KPTzujC9CG4Elw5aN2YQ4M9c0gCYF6ok98X0arGWw0fvg0YsqdlU 3GSJNMt7cDfhZrqJqIsta7XcSLO7Yerv2J0ok9vJ49WH0AmpXA9k/7rmmWcP7rswubYgRw IgM0lkNgELElPkc7+hZfxbR4pfjzEHk= 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-340-UEURmLKoN4uLTga7Rrh3Gw-1; Tue, 05 Jan 2021 13:45:44 -0500 X-MC-Unique: UEURmLKoN4uLTga7Rrh3Gw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 82D7F10054FF; Tue, 5 Jan 2021 18:45:42 +0000 (UTC) Received: from ovpn-115-104.rdu2.redhat.com (ovpn-115-104.rdu2.redhat.com [10.10.115.104]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2B4AB60BE5; Tue, 5 Jan 2021 18:45:38 +0000 (UTC) Message-ID: <67ef893f27551f80ecf49ef78c0ebc05d3e41b46.camel@redhat.com> Subject: Re: [PATCH v2 2/2] mm: fix initialization of struct page for holes in memory layout From: Qian Cai To: Mike Rapoport Cc: Andrew Morton , Andrea Arcangeli , Baoquan He , David Hildenbrand , Mel Gorman , Michal Hocko , Mike Rapoport , Vlastimil Babka , linux-kernel@vger.kernel.org, linux-mm@kvack.org, stable@vger.kernel.org, Stephen Rothwell , Linux Next Mailing List Date: Tue, 05 Jan 2021 13:45:37 -0500 In-Reply-To: <20210105082403.GA1106298@kernel.org> References: <20201209214304.6812-1-rppt@kernel.org> <20201209214304.6812-3-rppt@kernel.org> <768cb57d6ef0989293b3f9fbe0af8e8851723ea1.camel@redhat.com> <20210105082403.GA1106298@kernel.org> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2021-01-05 at 10:24 +0200, Mike Rapoport wrote: > Hi, > > On Mon, Jan 04, 2021 at 02:03:00PM -0500, Qian Cai wrote: > > On Wed, 2020-12-09 at 23:43 +0200, Mike Rapoport wrote: > > > From: Mike Rapoport > > > > > > Interleave initialization of pages that correspond to holes with the > > > initialization of memory map, so that zone and node information will be > > > properly set on such pages. > > > > > > Fixes: 73a6e474cb37 ("mm: memmap_init: iterate over memblock regions > > > rather > > > that check each PFN") > > > Reported-by: Andrea Arcangeli > > > Signed-off-by: Mike Rapoport > > > > Reverting this commit on the top of today's linux-next fixed a crash while > > reading /proc/kpagecount on a NUMA server. > > Can you please post the entire dmesg? http://people.redhat.com/qcai/dmesg.txt > Is it possible to get the pfn that triggered the crash? Do you have any idea how to convert that fffffffffffffffe to pfn as it is always that address? I don't understand what that address is though. I tried to catch it from struct page pointer and page_address() without luck. > > > [ 8858.006726][T99897] BUG: unable to handle page fault for address: > > fffffffffffffffe > > [ 8858.014814][T99897] #PF: supervisor read access in kernel mode > > [ 8858.020686][T99897] #PF: error_code(0x0000) - not-present page > > [ 8858.026557][T99897] PGD 1371417067 P4D 1371417067 PUD 1371419067 PMD 0 > > [ 8858.033224][T99897] Oops: 0000 [#1] SMP KASAN NOPTI > > [ 8858.038710][T99897] CPU: 28 PID: 99897 Comm: proc01 Tainted: > > G O 5.11.0-rc1-next-20210104 #1 > > [ 8858.048515][T99897] Hardware name: HPE ProLiant DL385 Gen10/ProLiant > > DL385 Gen10, BIOS A40 03/09/2018 > > [ 8858.057794][T99897] RIP: 0010:kpagecount_read+0x1be/0x5e0 > > PageSlab at include/linux/page-flags.h:342 > > (inlined by) kpagecount_read at fs/proc/page.c:69 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=-11.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,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 AE988C433E0 for ; Tue, 5 Jan 2021 18:45:50 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 44F4C22D5B for ; Tue, 5 Jan 2021 18:45:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 44F4C22D5B 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 CC1728D009B; Tue, 5 Jan 2021 13:45:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C74E58D0095; Tue, 5 Jan 2021 13:45:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B3A6B8D009B; Tue, 5 Jan 2021 13:45:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0198.hostedemail.com [216.40.44.198]) by kanga.kvack.org (Postfix) with ESMTP id 9E9F38D0095 for ; Tue, 5 Jan 2021 13:45:49 -0500 (EST) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 5AA56362C for ; Tue, 5 Jan 2021 18:45:49 +0000 (UTC) X-FDA: 77672600418.10.cloud12_0c09a63274db Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin10.hostedemail.com (Postfix) with ESMTP id 3477A16A0AB for ; Tue, 5 Jan 2021 18:45:49 +0000 (UTC) X-HE-Tag: cloud12_0c09a63274db X-Filterd-Recvd-Size: 4665 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by imf20.hostedemail.com (Postfix) with ESMTP for ; Tue, 5 Jan 2021 18:45:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1609872348; 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=K1TAF9Fcst8dyNOllX1PJEA1E2V0hS7RDbI5Vu/KXE0=; b=bBL++o8Te4n40lZO83KPTzujC9CG4Elw5aN2YQ4M9c0gCYF6ok98X0arGWw0fvg0YsqdlU 3GSJNMt7cDfhZrqJqIsta7XcSLO7Yerv2J0ok9vJ49WH0AmpXA9k/7rmmWcP7rswubYgRw IgM0lkNgELElPkc7+hZfxbR4pfjzEHk= 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-340-UEURmLKoN4uLTga7Rrh3Gw-1; Tue, 05 Jan 2021 13:45:44 -0500 X-MC-Unique: UEURmLKoN4uLTga7Rrh3Gw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 82D7F10054FF; Tue, 5 Jan 2021 18:45:42 +0000 (UTC) Received: from ovpn-115-104.rdu2.redhat.com (ovpn-115-104.rdu2.redhat.com [10.10.115.104]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2B4AB60BE5; Tue, 5 Jan 2021 18:45:38 +0000 (UTC) Message-ID: <67ef893f27551f80ecf49ef78c0ebc05d3e41b46.camel@redhat.com> Subject: Re: [PATCH v2 2/2] mm: fix initialization of struct page for holes in memory layout From: Qian Cai To: Mike Rapoport Cc: Andrew Morton , Andrea Arcangeli , Baoquan He , David Hildenbrand , Mel Gorman , Michal Hocko , Mike Rapoport , Vlastimil Babka , linux-kernel@vger.kernel.org, linux-mm@kvack.org, stable@vger.kernel.org, Stephen Rothwell , Linux Next Mailing List Date: Tue, 05 Jan 2021 13:45:37 -0500 In-Reply-To: <20210105082403.GA1106298@kernel.org> References: <20201209214304.6812-1-rppt@kernel.org> <20201209214304.6812-3-rppt@kernel.org> <768cb57d6ef0989293b3f9fbe0af8e8851723ea1.camel@redhat.com> <20210105082403.GA1106298@kernel.org> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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 Tue, 2021-01-05 at 10:24 +0200, Mike Rapoport wrote: > Hi, > > On Mon, Jan 04, 2021 at 02:03:00PM -0500, Qian Cai wrote: > > On Wed, 2020-12-09 at 23:43 +0200, Mike Rapoport wrote: > > > From: Mike Rapoport > > > > > > Interleave initialization of pages that correspond to holes with the > > > initialization of memory map, so that zone and node information will be > > > properly set on such pages. > > > > > > Fixes: 73a6e474cb37 ("mm: memmap_init: iterate over memblock regions > > > rather > > > that check each PFN") > > > Reported-by: Andrea Arcangeli > > > Signed-off-by: Mike Rapoport > > > > Reverting this commit on the top of today's linux-next fixed a crash while > > reading /proc/kpagecount on a NUMA server. > > Can you please post the entire dmesg? http://people.redhat.com/qcai/dmesg.txt > Is it possible to get the pfn that triggered the crash? Do you have any idea how to convert that fffffffffffffffe to pfn as it is always that address? I don't understand what that address is though. I tried to catch it from struct page pointer and page_address() without luck. > > > [ 8858.006726][T99897] BUG: unable to handle page fault for address: > > fffffffffffffffe > > [ 8858.014814][T99897] #PF: supervisor read access in kernel mode > > [ 8858.020686][T99897] #PF: error_code(0x0000) - not-present page > > [ 8858.026557][T99897] PGD 1371417067 P4D 1371417067 PUD 1371419067 PMD 0 > > [ 8858.033224][T99897] Oops: 0000 [#1] SMP KASAN NOPTI > > [ 8858.038710][T99897] CPU: 28 PID: 99897 Comm: proc01 Tainted: > > G O 5.11.0-rc1-next-20210104 #1 > > [ 8858.048515][T99897] Hardware name: HPE ProLiant DL385 Gen10/ProLiant > > DL385 Gen10, BIOS A40 03/09/2018 > > [ 8858.057794][T99897] RIP: 0010:kpagecount_read+0x1be/0x5e0 > > PageSlab at include/linux/page-flags.h:342 > > (inlined by) kpagecount_read at fs/proc/page.c:69