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=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no 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 1627AC433DB for ; Tue, 5 Jan 2021 05:33:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 888C422482 for ; Tue, 5 Jan 2021 05:33:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 888C422482 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 656E28D0053; Tue, 5 Jan 2021 00:33:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 607758D0036; Tue, 5 Jan 2021 00:33:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4F6128D0053; Tue, 5 Jan 2021 00:33:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0220.hostedemail.com [216.40.44.220]) by kanga.kvack.org (Postfix) with ESMTP id 36DBE8D0036 for ; Tue, 5 Jan 2021 00:33:15 -0500 (EST) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id E2ADE8248047 for ; Tue, 5 Jan 2021 05:33:14 +0000 (UTC) X-FDA: 77670603108.17.month46_3d046f7274d6 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin17.hostedemail.com (Postfix) with ESMTP id C7224180D0180 for ; Tue, 5 Jan 2021 05:33:14 +0000 (UTC) X-HE-Tag: month46_3d046f7274d6 X-Filterd-Recvd-Size: 5045 Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) by imf47.hostedemail.com (Postfix) with ESMTP for ; Tue, 5 Jan 2021 05:33:13 +0000 (UTC) Received: by mail-ed1-f52.google.com with SMTP id cm17so29801051edb.4 for ; Mon, 04 Jan 2021 21:33:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oF2GDGKJ22j+kOO4e1xITj1l5oJrdeGhoCxjiiBLDHE=; b=B/GtkofxvlekvKu2bmoTMY5y+rva90Yj+V5rgGio8nlFPyLYimwuYmPqNir95GSxyA MCAJvpFn6XBK06s0HiX3KT/rjCnmKcZlWdzM8GGT3MC2PExt31bRzlK/SvW3lt5DOzdK Ahw9jYbQtwgOxyvDTbH/J97G5ySsykeHsEdKDX08kOBhgJh+Gqx8tG5NwKCeETkeXQLH 9zYO1ADG3kF+xvX+4qeRyR23XDJ/AGaQ0cwnb9OqDSZJLpvxdGqJJ1cU1gMDzAKtXAcK 7su6aWP/Fqy6UJiI33x9MxHOqYA6s88u9xmRZNc00H9bVDTtxacOcSNluRiLAeD+lWEZ trTQ== 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=oF2GDGKJ22j+kOO4e1xITj1l5oJrdeGhoCxjiiBLDHE=; b=SLFZGxsFZmsilXL0CzvjiOX0CWDDFc4rjqW1IDt4Ls6ScHxB/4xVgjFK9eRarxeDwI UFDFyw/kO3duNsLyxoFNqSXEbSvIg7xBuQWgybeN0UB2KnRrvss3FyE9yqNmJAQggQ4M zHtwbAg6vR+7hWqgCxB9/k9zoMGKNHgyi3mUYn/NfK0WUZiEJmCWKtBCN/+1mF3/Xsh1 h7J/x5x49xMg1j44iLtzDUoim9Q8eVOolKrP9lhol4uSYw+oL04mAalfA9REQUPn7Wz0 Q5S7Ct+rw5IzBKJC93/S5OGJToeKVFTegC3Ytw2hrn3UFAcZwyMEqyuCcHKqaqRs952i +GBg== X-Gm-Message-State: AOAM533JZLnJgQVqh9N+y+T33IRIyALB1c6e/pqAhKfPT76jqhgfG6jM C6fAh8yno9QX/WgQgaOW6FcWsWXXsSFDhYi4XQm7G91JQuU= X-Google-Smtp-Source: ABdhPJxeBs+rBNKHoRYe+Mb3Xo/i9IMHUIEuriorbpf7SrTOvflcbGjT6T5XYxsSgFnmCL3+yQqDw+3ixGGbAzvCSuY= X-Received: by 2002:aa7:c3cd:: with SMTP id l13mr73223647edr.97.1609824792593; Mon, 04 Jan 2021 21:33:12 -0800 (PST) MIME-Version: 1.0 References: <20210104100323.GC13207@dhcp22.suse.cz> <033e1cd6-9762-5de6-3e88-47d3038fda7f@redhat.com> <20210104142624.GI13207@dhcp22.suse.cz> <23a4eea2-9fdb-fd1d-ee92-9cd8ac6e8f41@redhat.com> <20210104151005.GK13207@dhcp22.suse.cz> <26db2c3e-10c7-c6e3-23f7-21eb5101b31a@redhat.com> <20210104153300.GL13207@dhcp22.suse.cz> <20210104155931.GN13207@dhcp22.suse.cz> In-Reply-To: <20210104155931.GN13207@dhcp22.suse.cz> From: Dan Williams Date: Mon, 4 Jan 2021 21:33:06 -0800 Message-ID: Subject: Re: uninitialized pmem struct pages To: Michal Hocko Cc: David Hildenbrand , Linux MM , LKML , Oscar Salvador 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 Mon, Jan 4, 2021 at 7:59 AM Michal Hocko wrote: > > On Mon 04-01-21 16:43:49, David Hildenbrand wrote: > > On 04.01.21 16:33, Michal Hocko wrote: > > > On Mon 04-01-21 16:15:23, David Hildenbrand wrote: > > >> On 04.01.21 16:10, Michal Hocko wrote: > > > [...] > > >> Do the physical addresses you see fall into the same section as boot > > >> memory? Or what's around these addresses? > > > > > > Yes I am getting a garbage for the first struct page belonging to the > > > pmem section [1] > > > [ 0.020161] ACPI: SRAT: Node 0 PXM 0 [mem 0x100000000-0x603fffffff] > > > [ 0.020163] ACPI: SRAT: Node 4 PXM 4 [mem 0x6060000000-0x11d5fffffff] non-volatile > > > > > > The pfn without the initialized struct page is 0x6060000. This is a > > > first pfn in a section. > > > > Okay, so we're not dealing with the "early section" mess I described, > > different story. > > > > Due to [1], is_mem_section_removable() called > > pfn_to_page(PHYS_PFN(0x6060000)). page_zone(page) made it crash, as not > > initialized. > > Exactly! > > > Let's assume this is indeed a reserved pfn in the altmap. What's the > > actual address of the memmap? > > Not sure what exactly you are asking for but crash says > crash> kmem -p 6060000 > PAGE PHYSICAL MAPPING INDEX CNT FLAGS > fffff8c600181800 6060000 0 0 0 fffffc0000000 > > > I do wonder what hosts pfn_to_page(PHYS_PFN(0x6060000)) - is it actually > > part of the actual altmap (i.e. > 0x6060000) or maybe even self-hosted? > > I am not really familiar with the pmem so I would need more assistance > here. I've tried this (shot into the dark): > crash> struct page.pgmap fffff8c600181800 > pgmap = 0xfffff8c600181808 Does /proc/iomem show an active namespace in the range? You should be able to skip ahead to the first pfn in that namespace to find the first dev_pagemap. I would have expected pfn_to_online_page() to have saved you here. This address range is section aligned.