Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp14396202pxu; Mon, 4 Jan 2021 23:50:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJyYULgcWngSvqBnl19Bf04q40FFzC+njfI9oqn0dyY3pC9Sj9ww9yuoyVsUDfihs9GFpCBD X-Received: by 2002:a17:906:6c8b:: with SMTP id s11mr21590772ejr.187.1609833003420; Mon, 04 Jan 2021 23:50:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609833003; cv=none; d=google.com; s=arc-20160816; b=Tps/z41AIv1/GSI74YJpjhkrB5owr0wSJxjq395AnFSf+/FG57jPeH9YOAKBghTJcT g6hoP8iFgWPCvb8dUB0poB7L6yc5jzfo/kkWmKJwLRBzyHnZ+X9Vw7rTV2mw+DZz98ow GjG5hANS4WXJcwLHN84Zt+IgvhWtUppoLTIZve4Dh9lPjYOw1xYtk+7LfRZRvs/2knBb SSkrvjKZ8Jt2HGIbU6AZTRUbwCbd4myBN25OIY8FLdFqWHLH0dnHEKLGesfgqU8ho/9e G0BMvj/cAj9gjukijJbFKUF1ggBeaRppLBxQj3JL58OdBfAlIsOUBWP9Nlofrh/d+LkU vk9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=PZvIHglRXPVzsIw6aGokI+OdkiIsJ0foIp1wMTrMEbw=; b=jkkXQxlno90CkXKZJoKekFNaz/a0VUXMnYw1NylUqyH5iIE9pLh1/mmG5ZQ0LE6l1s 0T9dM0Pf0jho2xXsnyslYX1LKzFjbzO78PYrQwuTe+WD5zDuKDIDJJIHBugMiT6Yg8Hj tDXaRSq51V6ZMdH6txo82lyk7VX79e12B33FH0+tT2NTTHeiCy73DTOZFRJVa3ql4Sfk RL2HU2438Xmr+CV3gylvxUmTh/8WhzWC+ef/7rVcXRzbYxrltyAp2wa8+9XtpM0SvzUs wIf3AnYfrx9armMLQqGSPaDsH3W7Z8WrTFjeUU3we/acHOWdQayRWOkwfIafevM2O16+ vwUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=KzPvVaUg; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r19si29238254ejs.1.2021.01.04.23.49.39; Mon, 04 Jan 2021 23:50:03 -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=@suse.com header.s=susede1 header.b=KzPvVaUg; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726195AbhAEHps (ORCPT + 99 others); Tue, 5 Jan 2021 02:45:48 -0500 Received: from mx2.suse.de ([195.135.220.15]:39412 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725535AbhAEHpr (ORCPT ); Tue, 5 Jan 2021 02:45:47 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1609832700; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=PZvIHglRXPVzsIw6aGokI+OdkiIsJ0foIp1wMTrMEbw=; b=KzPvVaUgbYSu+YZYoPNmg7zVkoZ5IIN52R0227tJfW51hiywAopxwcmq1HGypt0NpSJjR2 7ewRVYuLWl77aFQEebR2mq6AcdPqMiO5vQqS5iobe7qp44qtzZZTI6chjkUitShDNGngsR t/JTBbjOltBbuN/K/Lxux6pCKHwZDzU= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id A9B04AA35; Tue, 5 Jan 2021 07:45:00 +0000 (UTC) Date: Tue, 5 Jan 2021 08:44:59 +0100 From: Michal Hocko To: David Hildenbrand Cc: Dan Williams , linux-mm@kvack.org, LKML , Oscar Salvador Subject: Re: uninitialized pmem struct pages Message-ID: <20210105074459.GR13207@dhcp22.suse.cz> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 04-01-21 17:30:48, David Hildenbrand wrote: > >> 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 Yes that made me scratch my head as well. > >> 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 ... I haven't noticed this is an offset into struct page. This is indeed weird because the structure is much larger than struct page. But maybe it reuses storage of several struct pages in a row. Or maybe it is not pgmap but something else that shares the offset in the structure. -- Michal Hocko SUSE Labs