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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 74D5CC433E0 for ; Mon, 4 Jan 2021 10:03:28 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0C1AF20780 for ; Mon, 4 Jan 2021 10:03:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0C1AF20780 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 280EC8D0002; Mon, 4 Jan 2021 05:03:27 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 230F46B009C; Mon, 4 Jan 2021 05:03:27 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1703F8D0002; Mon, 4 Jan 2021 05:03:27 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0252.hostedemail.com [216.40.44.252]) by kanga.kvack.org (Postfix) with ESMTP id 0003D6B009A for ; Mon, 4 Jan 2021 05:03:26 -0500 (EST) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id BAD0F180AD802 for ; Mon, 4 Jan 2021 10:03:26 +0000 (UTC) X-FDA: 77667655212.04.horse96_1e0f418274cf Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin04.hostedemail.com (Postfix) with ESMTP id A11808005195 for ; Mon, 4 Jan 2021 10:03:26 +0000 (UTC) X-HE-Tag: horse96_1e0f418274cf X-Filterd-Recvd-Size: 2488 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf31.hostedemail.com (Postfix) with ESMTP for ; Mon, 4 Jan 2021 10:03:26 +0000 (UTC) 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=1609754605; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=XvxQL3uo22xOTWuEV8NxyovOsIbCf5mKq1Te0FZo3Bw=; b=pCfhgPrgcnkR4WfgJRm8EFDbmJKccSO1JxSZxj4mXh9krJcUjo0z66jQP24eo3ca8PYsU+ Nk9DdyledQXBPQxA+SdKptXfmYlhg6QkublCdq/S5h+TfqUdpSc0PLAKS6Z1RTvWIHJX1a rKe8oVOZRwL1A0ALQsypJdofTjAJcOQ= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id E902AAD18; Mon, 4 Jan 2021 10:03:24 +0000 (UTC) Date: Mon, 4 Jan 2021 11:03:23 +0100 From: Michal Hocko To: Dan Williams Cc: David Hildenbrand , linux-mm@kvack.org, LKML Subject: uninitialized pmem struct pages Message-ID: <20210104100323.GC13207@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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: Hi, back in March [1] you have recommended 53cdc1cb29e8 ("drivers/base/memory.c: indicate all memory blocks as removable") to be backported to stable trees and that has led to a more general discussion about the current state of pfn walkers wrt. uninitialized pmem struct pages. We haven't concluded any specific solution for that except for a general sentiment that pfn_to_online_page should be able to catch those. I might have missed any follow ups on that but I do not think we have landed on any actual solution in the end. Have I just missed any followups? Is anybody working on that? Also is there any reference explaining what those struct pages are and why we cannot initialize them? I am sorry if this has been explained to me but I really cannot find that in my notes anywhere. Most pmem pages should be initialized via memmap_init_zone_device, right? I am asking mostly because we are starting to see these issues in production and while the only visible problem so far is a crash when reading sysfs (removable file) I am worried we are just lucky no other pfn walker stumble over this. [1] http://lkml.kernel.org/r/CAPcyv4jpdaNvJ67SkjyUJLBnBnXXQv686BiVW042g03FUmWLXw@mail.gmail.com -- Michal Hocko SUSE Labs