Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp14393678pxu; Mon, 4 Jan 2021 23:44:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJw5nS1octESqUcF2HXhPFRDZnG38OX3OuszaTfbuNiiUZjPd041X2I6/VHTWVqHOCRUqzmR X-Received: by 2002:a17:907:94c6:: with SMTP id dn6mr69744356ejc.13.1609832647786; Mon, 04 Jan 2021 23:44:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609832647; cv=none; d=google.com; s=arc-20160816; b=LvLS1YhiG7dbbjdIlR4KB3nI1eC15bLebzUoT1AELrV0uhn4ElI2gV/hxcb85cXTyf H1vRokvkPet5675va5pyWN1+WW36KmAlrgIJign9E+MsHzIvzQUI6Y42lMo9P06WnmtI pkuPjYFCss3FfqL6OkQsgzyTuVjRGJDwGrYJDeKDzKQHLtKWzl86HCAhFpKJLRICPOwP cDfaw7fi1coX0qQRB+Z4SoGI2+BsfQvAcWQgigVC5ShtEx4robJc/mG2QOfyBRg7/iOC 7u5bCEFRms9OnwYD9moxz3tpZij/bX8S2TYfdKCEaSDB8E94wB6hgnSuzg1Y4X7xT+8V iyGQ== 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=P7COg91NEwnP/uoCOSBzJuMmSS7WoPNptWSZsUU3f/o=; b=aBxDqVqvjAVgMez5h9SHmCb8LAlc7q5uv5jOveoAWBq5zgeZn4x6SH68G2htdnwNLi 3+icqWEhzyuvejsBsvGS8pM2Vrv2QAmuw2y5onAyhNw8yVp4YDGNS6rHWn9wtZIYJt8c bX4U1iGm3o3S1OB21R+GdbCzQgaD881IEimV8Yk76xQ4Su72rH488ZphWJji+Zhm0qlv 1GJsmeY1fcYn3Aqfe5QDrndKo3sxnP0IUKKanDXxLah8hoj04Ov80a9ZII2iV8Cj3QvN 5Iwe8CG2P2QNvL9hAip9pVvDOYc4XuVu+uTTmKiB9XbH7pPPdIsT5zqg5An7+BNTnPM6 /nfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=EgoV3I74; 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 m8si29890354ejr.206.2021.01.04.23.43.44; Mon, 04 Jan 2021 23:44:07 -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=EgoV3I74; 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 S1726962AbhAEHlk (ORCPT + 99 others); Tue, 5 Jan 2021 02:41:40 -0500 Received: from mx2.suse.de ([195.135.220.15]:37162 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726029AbhAEHlk (ORCPT ); Tue, 5 Jan 2021 02:41:40 -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=1609832453; 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=P7COg91NEwnP/uoCOSBzJuMmSS7WoPNptWSZsUU3f/o=; b=EgoV3I74xEMcKMjMn8KSvPeJlhAkzWHkNZaQLGiBRNeJIO6Alplk6EH2ruegnoHQvvBMgg 2Bqc9PoIiiuGaWSwqibh6awULQORFO22w9Za4LKdSFqgoiu0osr4d+0cdvodYvpqEHsLqx iitl2vtvJ3rH85xTolJbWwD8ByKKRKU= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 5993AAA35; Tue, 5 Jan 2021 07:40:53 +0000 (UTC) Date: Tue, 5 Jan 2021 08:40:52 +0100 From: Michal Hocko To: Dan Williams Cc: David Hildenbrand , Linux MM , LKML , Oscar Salvador Subject: Re: uninitialized pmem struct pages Message-ID: <20210105074052.GQ13207@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 21:33:06, Dan Williams wrote: > On Mon, Jan 4, 2021 at 7:59 AM Michal Hocko wrote: [...] > > 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? Any tips how I dig that out from the crash dump? > 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. Well, the affected code in this case was end_pfn = min(start_pfn + nr_pages, zone_end_pfn(page_zone(pfn_to_page(start_pfn)))); where start_pfn was the first pfn of a memory section. This code was completely unaware of zone device or dev_pagemap like most others pfn walkers. It just wanted to get bounds for the zone but it stumbled over uninitialized zone/node. -- Michal Hocko SUSE Labs