From: David Hildenbrand <david@redhat.com>
To: Michal Hocko <mhocko@suse.com>, Dan Williams <dan.j.williams@intel.com>
Cc: Linux MM <linux-mm@kvack.org>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: uninitialized pmem struct pages
Date: Tue, 5 Jan 2021 10:16:33 +0100 [thread overview]
Message-ID: <5fa1ff35-71f3-2526-6819-34c1ee959295@redhat.com> (raw)
In-Reply-To: <20210105075028.GS13207@dhcp22.suse.cz>
On 05.01.21 08:50, Michal Hocko wrote:
> On Mon 04-01-21 21:17:43, Dan Williams wrote:
>> On Mon, Jan 4, 2021 at 2:45 AM David Hildenbrand <david@redhat.com> wrote:
> [...]
>>> I believe Dan mentioned somewhere that he wants to see a real instance
>>> of this producing a BUG before actually moving forward with a fix. I
>>> might be wrong.
>>
>> I think I'm missing an argument for the user-visible effects of the
>> "Bad." statements above. I think soft_offline_page() is a candidate
>> for a local fix because mm/memory-failure.c already has a significant
>> amount of page-type specific knowledge. So teaching it "yes" for
>> MEMORY_DEVICE_PRIVATE-ZONE_DEVICE and "no" for other ZONE_DEVICE seems
>> ok to me.
>
> I believe we do not want to teach _every_ pfn walker about zone device
> pages. This would be quite error prone. Especially when a missig check
> could lead to a silently broken data or BUG_ON with debugging enabled
> (which is not the case for many production users). Or are we talking
> about different bugs here?
I'd like us to stick to the documentation, e.g., include/linux/mmzone.h
"
pfn_valid() is meant to be able to tell if a given PFN has valid memmap
associated with it or not. This means that a struct page exists for this
pfn. The caller cannot assume the page is fully initialized in general.
Hotplugable pages might not have been onlined yet. pfn_to_online_page()
will ensure the struct page is fully online and initialized. Special
pages (e.g. ZONE_DEVICE) are never onlined and should be treated
accordingly.
"
--
Thanks,
David / dhildenb
next prev parent reply other threads:[~2021-01-05 9:16 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-04 10:03 Michal Hocko
2021-01-04 10:45 ` David Hildenbrand
2021-01-04 14:26 ` Michal Hocko
2021-01-04 14:51 ` David Hildenbrand
2021-01-04 15:10 ` Michal Hocko
2021-01-04 15:15 ` David Hildenbrand
2021-01-04 15:33 ` Michal Hocko
2021-01-04 15:43 ` David Hildenbrand
2021-01-04 15:44 ` David Hildenbrand
2021-01-05 8:00 ` Michal Hocko
2021-01-05 8:16 ` Michal Hocko
2021-01-05 8:27 ` Dan Williams
2021-01-05 8:42 ` Michal Hocko
2021-01-05 8:57 ` Dan Williams
2021-01-05 9:05 ` Michal Hocko
2021-01-05 9:13 ` David Hildenbrand
2021-01-05 9:25 ` Michal Hocko
2021-01-05 9:27 ` David Hildenbrand
2021-01-04 15:59 ` Michal Hocko
2021-01-04 16:30 ` David Hildenbrand
2021-01-05 7:44 ` Michal Hocko
2021-01-05 9:56 ` David Hildenbrand
2021-01-05 5:33 ` Dan Williams
2021-01-05 7:40 ` Michal Hocko
2021-01-05 5:17 ` Dan Williams
2021-01-05 7:50 ` Michal Hocko
2021-01-05 9:16 ` David Hildenbrand [this message]
2021-01-05 9:25 ` David Hildenbrand
2021-01-05 9:33 ` Dan Williams
2021-01-05 9:37 ` David Hildenbrand
2021-01-05 9:56 ` Dan Williams
2021-01-05 9:58 ` David Hildenbrand
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=5fa1ff35-71f3-2526-6819-34c1ee959295@redhat.com \
--to=david@redhat.com \
--cc=dan.j.williams@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.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