Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp13707363pxu; Mon, 4 Jan 2021 02:07:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJwesWCvqWM/OYptnXbaoWU3sCvmKCRJtbVm9pBJOIV68I+IigtUw8nJTS0YiZBwsWSaRplc X-Received: by 2002:a17:906:b1c8:: with SMTP id bv8mr67248108ejb.208.1609754852175; Mon, 04 Jan 2021 02:07:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609754852; cv=none; d=google.com; s=arc-20160816; b=cGOskkQMY/kOn0eRXMLGyFU9oaXJ1xrTrUiMdmV2OAOv1J4BHIUEwITWpTyr0YFR+8 tlVIkQPU990pY1w4heSibWOgCaHBRhrLt+VoOZ2HUasm5lQSGoBAaMqc6c46euqfv6pe 4inpO2WQxu5LiVafz5S6z/SODfJUuv0/fswqxiZdb391a4WsNWtIlxWUhE3Z2WJeHPgT KvksPRQzTYgrbeK+FD8nwFKGazjngqvq9ck4Vm8tXWHRqjK1y1eiBAm3qvoYFjLZUaN8 7jv6OGLcasraPOJ8fqblzbjXACAETBfnGxJUdLAeB9XohisSR7A3AcgAkd85QaNoqqvj 6SMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=XvxQL3uo22xOTWuEV8NxyovOsIbCf5mKq1Te0FZo3Bw=; b=OSArbgA7w2SPVwMwWCOCpA4oQ0kWEkqPzY4eCjRUrK+9Xvl0kPqEa/QRpBfmICa/58 UN9xjB+nI88aAJXazbCM1WwKsoaGG3ymn5tj2YWx5TkWGCc2jHa/8IMj7BNk+0uuvTwx 3LJMHK49RmClmKbDLkp6GJjC7x3hla7xLpEH3ECUf8PeVgYMQWkrIuI6O21rNfWC5lMx oUHrztNMhx6s4qYVmr4grXBjsRVOIMouYVoNhMYKzShFdWfmNSx54F2uDJT4x0NJSvwQ CmZ44UW8MQiLJ1EiYpzMCbWqlardZpJrx1sFUlZvqq+sifEv3Jp2K1LX/j+rh0A/wJnP QTIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=pCfhgPrg; 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 n18si27566342ejk.69.2021.01.04.02.07.09; Mon, 04 Jan 2021 02:07:32 -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=pCfhgPrg; 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 S1726176AbhADKEL (ORCPT + 99 others); Mon, 4 Jan 2021 05:04:11 -0500 Received: from mx2.suse.de ([195.135.220.15]:44176 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725830AbhADKEL (ORCPT ); Mon, 4 Jan 2021 05:04:11 -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=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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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