Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp13943071pxu; Mon, 4 Jan 2021 08:34:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJzYtm0Ps39/gdkLP6aUFDEpp1FTGAxmrcNp1ItHHMckIvRhwhF61b9GBya9sEGozAOFzP1C X-Received: by 2002:a17:906:3f8d:: with SMTP id b13mr53630519ejj.464.1609778061778; Mon, 04 Jan 2021 08:34:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609778061; cv=none; d=google.com; s=arc-20160816; b=KTep1EEjUMFdEciVcMaJxgLAN01gr2uv9OAJ3XUVJ74hXVU/EfZajW2bWenfRVOefo LIXGSpowL/WVccK3r2/QHzARGhGuBq7GF86mbtjN8WAyVpxDYx3zjVgsrFPXYGhiKmxX PB9BAXWT//Fo7ZgOFLdfoNg/8A4G/0tqH/lZnlNisKoPF9K4WMmKH9qRkCDtpF1WodbK hX/oxmbrVlkMzgmeXdXnHA3889J3GhABftROpFJpyytLWB7BmNhc07Bccu0c32zzd6fa nKAwVb6wFq3zTqPy1uQY/HMw22JduRSwIP+mRrbIsiTjDUuwHLlEsqt2Il6CsF2QfRbT BG4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature; bh=QJN1qsMOLVTuDkPDhsf9jdeYHMvv+gruDegQHf3V90o=; b=bDbJ2rm4L0v/EAr6qy0I1yKBsRC1Z6kYxW2vFJZYANlaby5Hj5soUmHVtBD4Q/M7y9 bxgIswLQgZXjDY6mY5eOWiyZOdVvGbYmBdly1CqtYSF3UtTQFftOJl5owytF29PErtYK IdpHgooXHoG51Ld8idrHDykvUOY1YVtYdXYMonkdV2ZursG8pWS3XmTHGRF0QpACc3Kd N2OmK1Kmbypq5VlHTmH4R3gNF1OTUvmrzcAEufICQda01JDT1i7+Mc1FwM9jWSRZ4Rme GiUYuY6ITYijiph5UpluTK+DBFXomfMsUCiV3nW8b4LBNeJdp5io8MoUgkvCJW4EgQcM 2uxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CvVSljLq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j24si31385964edt.448.2021.01.04.08.33.57; Mon, 04 Jan 2021 08:34:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CvVSljLq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727720AbhADQcW (ORCPT + 99 others); Mon, 4 Jan 2021 11:32:22 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:39642 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727522AbhADQcV (ORCPT ); Mon, 4 Jan 2021 11:32:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1609777855; 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=QJN1qsMOLVTuDkPDhsf9jdeYHMvv+gruDegQHf3V90o=; b=CvVSljLqV6PoPUdva0Fmaq+kAVHOXg3wj3TS1Ep8sxqhLKotgUk9244cmSu3BFn9h9N6Qg XC/CUHeDdrmDbtYVFrD9yz7gaL1qgxKdtcZJ93TAzkxOObxUzMwtf6x9Mawxwi0A2TOni7 te0HmP1mPJWdYOCbWFFVkgr69BNbtuo= 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-322-KpCuSUgzOYS6G2GzFpIlFQ-1; Mon, 04 Jan 2021 11:30:52 -0500 X-MC-Unique: KpCuSUgzOYS6G2GzFpIlFQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4A40118C8C01; Mon, 4 Jan 2021 16:30:51 +0000 (UTC) Received: from [10.36.114.59] (ovpn-114-59.ams2.redhat.com [10.36.114.59]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2F1A761D31; Mon, 4 Jan 2021 16:30:50 +0000 (UTC) Subject: Re: uninitialized pmem struct pages To: Michal Hocko Cc: Dan Williams , linux-mm@kvack.org, LKML , Oscar Salvador 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> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: Date: Mon, 4 Jan 2021 17:30:48 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <20210104155931.GN13207@dhcp22.suse.cz> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> 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 ^ this looks like it was somewhat initialized. All flags zero, nid/zone set to -1 (wild guess) and thus the crash? weird > >> 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 That's weird. If the memmap is at fffff8c600181800, why should the pgmap be at an offset of 8 bytes from there. The "pgmap" field is actually at an offset of 8 bytes within the memmap ... Assuming the memmap is not actually ZONE_DEVICE, fffff8c600181800 really only contains garbage, including the pgmap pointer :( > crash> struct -x dev_pagemap 0xfffff8c600181808 > struct dev_pagemap { > altmap = { > base_pfn = 0xfffff8c600181808, > end_pfn = 0xfffff8c600181808, ^ because this is very weird > reserve = 0x0, ^ and this indicates nothing was actually reserved. -- Thanks, David / dhildenb