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=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, 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 B3976C17441 for ; Mon, 11 Nov 2019 16:23:52 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 750C920679 for ; Mon, 11 Nov 2019 16:23:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=intel-com.20150623.gappssmtp.com header.i=@intel-com.20150623.gappssmtp.com header.b="17xdVOab" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 750C920679 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DCA876B0007; Mon, 11 Nov 2019 11:23:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D54D66B0008; Mon, 11 Nov 2019 11:23:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C4C3C6B000A; Mon, 11 Nov 2019 11:23:51 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0152.hostedemail.com [216.40.44.152]) by kanga.kvack.org (Postfix) with ESMTP id ACCD36B0007 for ; Mon, 11 Nov 2019 11:23:51 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id 52B838249980 for ; Mon, 11 Nov 2019 16:23:51 +0000 (UTC) X-FDA: 76144517862.06.run20_3ea5b2bd45e37 X-HE-Tag: run20_3ea5b2bd45e37 X-Filterd-Recvd-Size: 4724 Received: from mail-ot1-f68.google.com (mail-ot1-f68.google.com [209.85.210.68]) by imf25.hostedemail.com (Postfix) with ESMTP for ; Mon, 11 Nov 2019 16:23:50 +0000 (UTC) Received: by mail-ot1-f68.google.com with SMTP id c19so11661163otr.11 for ; Mon, 11 Nov 2019 08:23:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EK5rfvfSII06/EDQTTan7V0YdFmqp+cuq2tEw4+bqpc=; b=17xdVOabPHkdqXoVofyU2oGM4B4m95gnLle7cFrn1YMkwWbiTLbI/0troG20gZ9VZF LX95md6dEop4QOSKcJgsP24YOZ4c5m60SFzvCmdSKsNe9Ef4Adyt0ep7D30gPmzEHFM3 76EKc9E/JZqf/JynqO0TwLB2ckYrJFa2hHgaU6yxQ1Dww953k3L5Rjl7vttXNiVlkffi 5Rj4ZrSXGK1/vW18zmnQLV1+QauUftzINox4U1Lt5dnXJu92M8zJhKHlXvI8I462ihZ1 bWKwEIaqGpVwuMVGwc56mpyZ+pRnnftycuMhYBn0tXtijl1QzzztqHZ0zwvmbBxHmN91 T4bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EK5rfvfSII06/EDQTTan7V0YdFmqp+cuq2tEw4+bqpc=; b=SyByBEQT7PsIDrmH8BgNwyZb/k4Tbci6annoEIGrgksuISufWdHuEZAeH9ihsY+I7i flMq6HbnGsel1HjdDOWeFTHl54jriP+Iydd5uJVDGvaSfgMuc+jV9cb/xYJxhjYAzOd0 bkbXprtek3kcAY27KoVRIQHPNuh/6Ithk3ovbXUDvL0ClGGXHnq4gDIX+B/9M+Emi99D TN9UZhWUcPWHSGw7Sbtiry31vtdaPw261SEkps8pHpKI6qiSbhj3zVVBImT221gB7L8i YO9iudFaPj7e6rpAdIyinqYxOwd9ZGCdG/iEEsYH8HpN1k5bWw1q6fZYJdGvAuzH/Fqn z6hg== X-Gm-Message-State: APjAAAU0R/1Y114wx8HWFy6r0Oa3d9hQiOCqBoL//nGI8h9GUjWqTvqN jZ4njZrw6MPc2riIjQMYECURfDHlNAvGpooUxM9GRQ== X-Google-Smtp-Source: APXvYqywohi4GCAt/BglQ3C0fcbjKIg2OIffbbL/IPdakdWcpjfBuw1FR1rGa7efSojC1F+sMY799Z6U/QZm/PuYdQo= X-Received: by 2002:a05:6830:1af7:: with SMTP id c23mr20766490otd.247.1573489429293; Mon, 11 Nov 2019 08:23:49 -0800 (PST) MIME-Version: 1.0 References: <20191108000855.25209-1-t-fukasawa@vx.jp.nec.com> <20191108091851.GB15658@dhcp22.suse.cz> <5fc7da0c-bd79-9f3b-e5d9-8688648cf032@vx.jp.nec.com> In-Reply-To: <5fc7da0c-bd79-9f3b-e5d9-8688648cf032@vx.jp.nec.com> From: Dan Williams Date: Mon, 11 Nov 2019 08:23:38 -0800 Message-ID: Subject: Re: [PATCH 0/3] make pfn walker support ZONE_DEVICE To: Toshiki Fukasawa Cc: Michal Hocko , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "akpm@linux-foundation.org" , "adobriyan@gmail.com" , "hch@lst.de" , "longman@redhat.com" , "sfr@canb.auug.org.au" , "mst@redhat.com" , "cai@lca.pw" , Naoya Horiguchi , Junichi Nomura Content-Type: text/plain; charset="UTF-8" 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: On Mon, Nov 11, 2019 at 12:01 AM Toshiki Fukasawa wrote: > > On 2019/11/08 18:18, Michal Hocko wrote: > > On Fri 08-11-19 00:08:03, Toshiki Fukasawa wrote: > >> This patch set tries to make pfn walker support ZONE_DEVICE. > >> This idea is from the TODO in below patch: > >> > >> commit aad5f69bc161af489dbb5934868bd347282f0764 > >> Author: David Hildenbrand > >> Date: Fri Oct 18 20:19:20 2019 -0700 > >> > >> fs/proc/page.c: don't access uninitialized memmaps in fs/proc/page.c > >> > >> pfn walker's ZONE_DEVICE support requires capability to identify > >> that a memmap has been initialized. The uninitialized cases are > >> as follows: > >> > >> a) pages reserved for ZONE_DEVICE driver > >> b) pages currently initializing > >> > >> This patch set solves both of them. > > > > Why do we want this? What is the usecase? > > We are writing a test program for hwpoison, which is a use case. > Without this patch, we can't see the HWPOISON flag on the > ZONE_DEVICE page. I'm not sure that's a goal that's a worthwhile goal. That hwpoison flag has specific meaning for the System RAM case where the page is going to be marked offline. For the pmem case the nvdimm core tracks 'badblocks'. I did attempt to use PageHWPoison to track which pmem pages had been marked UC to prevent speculative consumption, but that implementation has been found to collide with lookup_memtype() so I'm looking ot replace it with something that consults with the pmem driver.