From: Dan Williams <dan.j.williams@intel.com>
To: David Hildenbrand <david@redhat.com>
Cc: Toshiki Fukasawa <t-fukasawa@vx.jp.nec.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"mhocko@kernel.org" <mhocko@kernel.org>,
"adobriyan@gmail.com" <adobriyan@gmail.com>,
"hch@lst.de" <hch@lst.de>,
"longman@redhat.com" <longman@redhat.com>,
"sfr@canb.auug.org.au" <sfr@canb.auug.org.au>,
"mst@redhat.com" <mst@redhat.com>, "cai@lca.pw" <cai@lca.pw>,
Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
Junichi Nomura <j-nomura@ce.jp.nec.com>,
Oscar Salvador <osalvador@suse.de>
Subject: Re: [PATCH 2/3] mm: Introduce subsection_dev_map
Date: Wed, 13 Nov 2019 13:26:42 -0800 [thread overview]
Message-ID: <CAPcyv4hw58eYJdb4ifvwX8m1E-AMyF5COmjEppz7px6vaB5cRA@mail.gmail.com> (raw)
In-Reply-To: <3E71366A-9232-46BB-8261-3FCB2300C80A@redhat.com>
On Wed, Nov 13, 2019 at 1:22 PM David Hildenbrand <david@redhat.com> wrote:
>
>
>
> > Am 13.11.2019 um 22:12 schrieb Dan Williams <dan.j.williams@intel.com>:
> >
> > On Wed, Nov 13, 2019 at 12:40 PM David Hildenbrand <david@redhat.com> wrote:
> > [..]
> >>>>>> I'm still struggling to understand the motivation of distinguishing
> >>>>>> "active" as something distinct from "online". As long as the "online"
> >>>>>> granularity is improved from sections down to subsections then most
> >>>>>> code paths are good to go. The others can use get_devpagemap() to
> >>>>>> check for ZONE_DEVICE in a race free manner as they currently do.
> >>>>>
> >>>>> I thought we wanted to unify access if we don’t really care about the zone as in most pfn walkers - E.g., for zone shrinking.
> >>>>
> >>>> Agree, when the zone does not matter, which is most cases, then
> >>>> pfn_online() and pfn_valid() are sufficient.
> >>
> >> Oh, and just to clarify why I proposed pfn_active(): The issue right now is that a PFN that is valid but not online could be offline memory (memmap not initialized) or ZONE_DEVICE. That‘s why I wanted to have a way to detect if a memmap was initialized, independent of the zone. That‘s important for generic PFN walkers.
> >
> > That's what I was debating with Toshiki [1], whether there is a real
> > example of needing to distinguish ZONE_DEVICE from offline memory in a
> > pfn walker. The proposed use case in this patch set of being able to
> > set hwpoison on ZONE_DEVICE pages does not seem like a good idea to
> > me. My suspicion is that this is a common theme and others are looking
> > to do these types page manipulations that only make sense for online
> > memory. If that is the case then treating ZONE_DEVICE as offline seems
> > the right direction.
>
> Right. At least it would be nice to have for zone shrinking - not sure about the other walkers. We would have to special-case ZONE_DEVICE handling there.
>
I think that's ok... It's already zone aware code whereas pfn walkers
are zone unaware and should stay that way if at all possible.
> But as I said, a subsection map for online memory is a good start, especially to fix pfn_to_online_page(). Also, I think this might be a very good thing to have for Oscars memmap-on-memory work (I have a plan in my head I can discuss with Oscar once he has time to work on that again).
Ok, I'll keep an eye out.
next prev parent reply other threads:[~2019-11-13 21:26 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-08 0:08 [PATCH 0/3] make pfn walker support ZONE_DEVICE Toshiki Fukasawa
2019-11-08 0:08 ` [PATCH 1/3] procfs: refactor kpage_*_read() in fs/proc/page.c Toshiki Fukasawa
2019-11-08 0:08 ` [PATCH 2/3] mm: Introduce subsection_dev_map Toshiki Fukasawa
2019-11-08 19:13 ` Dan Williams
2019-11-13 18:51 ` David Hildenbrand
2019-11-13 19:06 ` Dan Williams
2019-11-13 19:53 ` David Hildenbrand
2019-11-13 20:10 ` Dan Williams
2019-11-13 20:23 ` David Hildenbrand
2019-11-13 20:40 ` David Hildenbrand
2019-11-13 21:11 ` Dan Williams
2019-11-13 21:22 ` David Hildenbrand
2019-11-13 21:26 ` Dan Williams [this message]
2019-11-14 23:36 ` Toshiki Fukasawa
2019-11-15 0:46 ` David Hildenbrand
2019-11-15 2:57 ` Toshiki Fukasawa
2019-11-08 0:08 ` [PATCH 3/3] mm: make pfn walker support ZONE_DEVICE Toshiki Fukasawa
2019-11-09 17:08 ` kbuild test robot
2019-11-09 19:14 ` kbuild test robot
2019-11-08 9:18 ` [PATCH 0/3] " Michal Hocko
2019-11-11 8:00 ` Toshiki Fukasawa
2019-11-11 16:23 ` Dan Williams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAPcyv4hw58eYJdb4ifvwX8m1E-AMyF5COmjEppz7px6vaB5cRA@mail.gmail.com \
--to=dan.j.williams@intel.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=cai@lca.pw \
--cc=david@redhat.com \
--cc=hch@lst.de \
--cc=j-nomura@ce.jp.nec.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=longman@redhat.com \
--cc=mhocko@kernel.org \
--cc=mst@redhat.com \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=osalvador@suse.de \
--cc=sfr@canb.auug.org.au \
--cc=t-fukasawa@vx.jp.nec.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox