Re: [PATCH] mm: Teach pfn_to_online_page() about ZONE_DEVICE section collisions

2021-01-12 Thread Dan Williams
On Tue, Jan 12, 2021 at 1:44 AM David Hildenbrand wrote: > > On 12.01.21 10:18, Dan Williams wrote: > > On Thu, Jan 7, 2021 at 1:16 AM David Hildenbrand wrote: > >> > >> [...] > >> > > Well, I would love to have no surprises either. So far there was not > > actual argument why the pmem

Re: [PATCH] mm: Teach pfn_to_online_page() about ZONE_DEVICE section collisions

2021-01-12 Thread David Hildenbrand
On 12.01.21 10:18, Dan Williams wrote: > On Thu, Jan 7, 2021 at 1:16 AM David Hildenbrand wrote: >> >> [...] >> > Well, I would love to have no surprises either. So far there was not > actual argument why the pmem reserved space cannot be fully initialized. Yes, I'm still hoping

Re: [PATCH] mm: Teach pfn_to_online_page() about ZONE_DEVICE section collisions

2021-01-12 Thread Dan Williams
On Thu, Jan 7, 2021 at 1:16 AM David Hildenbrand wrote: > > [...] > > >>> Well, I would love to have no surprises either. So far there was not > >>> actual argument why the pmem reserved space cannot be fully initialized. > >> > >> Yes, I'm still hoping Dan can clarify that. > > > > Complexity

Re: [PATCH] mm: Teach pfn_to_online_page() about ZONE_DEVICE section collisions

2021-01-12 Thread Dan Williams
On Wed, Jan 6, 2021 at 1:55 AM Michal Hocko wrote: > > On Tue 05-01-21 20:07:18, Dan Williams wrote: > > While pfn_to_online_page() is able to determine pfn_valid() at > > subsection granularity it is not able to reliably determine if a given > > pfn is also online if the section is mixed with

Re: [PATCH] mm: Teach pfn_to_online_page() about ZONE_DEVICE section collisions

2021-01-07 Thread David Hildenbrand
[...] >>> Well, I would love to have no surprises either. So far there was not >>> actual argument why the pmem reserved space cannot be fully initialized. >> >> Yes, I'm still hoping Dan can clarify that. > > Complexity and effective utility (once pfn_to_online_page() is fixed) > are the

Re: [PATCH] mm: Teach pfn_to_online_page() about ZONE_DEVICE section collisions

2021-01-06 Thread Dan Williams
On Wed, Jan 6, 2021 at 3:23 AM David Hildenbrand wrote: > > On 06.01.21 11:42, Michal Hocko wrote: > > On Wed 06-01-21 10:56:19, David Hildenbrand wrote: > > [...] > >> Note that this is not sufficient in the general case. I already > >> mentioned that we effectively override an already

Re: [PATCH] mm: Teach pfn_to_online_page() about ZONE_DEVICE section collisions

2021-01-06 Thread Michal Hocko
On Wed 06-01-21 12:22:57, David Hildenbrand wrote: > On 06.01.21 11:42, Michal Hocko wrote: > > On Wed 06-01-21 10:56:19, David Hildenbrand wrote: > > [...] > >> Note that this is not sufficient in the general case. I already > >> mentioned that we effectively override an already initialized

Re: [PATCH] mm: Teach pfn_to_online_page() about ZONE_DEVICE section collisions

2021-01-06 Thread David Hildenbrand
On 06.01.21 11:42, Michal Hocko wrote: > On Wed 06-01-21 10:56:19, David Hildenbrand wrote: > [...] >> Note that this is not sufficient in the general case. I already >> mentioned that we effectively override an already initialized memmap. >> >> --- >> >> [SECTION ] >> Before:

Re: [PATCH] mm: Teach pfn_to_online_page() about ZONE_DEVICE section collisions

2021-01-06 Thread Michal Hocko
On Wed 06-01-21 10:56:19, David Hildenbrand wrote: [...] > Note that this is not sufficient in the general case. I already > mentioned that we effectively override an already initialized memmap. > > --- > > [SECTION ] > Before: > [ ZONE_NORMAL ][Hole ] > > The hole

Re: [PATCH] mm: Teach pfn_to_online_page() about ZONE_DEVICE section collisions

2021-01-06 Thread David Hildenbrand
> Am 06.01.2021 um 05:08 schrieb Dan Williams : > > While pfn_to_online_page() is able to determine pfn_valid() at > subsection granularity it is not able to reliably determine if a given > pfn is also online if the section is mixed with ZONE_DEVICE pfns. > > Update move_pfn_range_to_zone()

Re: [PATCH] mm: Teach pfn_to_online_page() about ZONE_DEVICE section collisions

2021-01-06 Thread David Hildenbrand
On 06.01.21 05:07, Dan Williams wrote: > While pfn_to_online_page() is able to determine pfn_valid() at > subsection granularity it is not able to reliably determine if a given > pfn is also online if the section is mixed with ZONE_DEVICE pfns. > > Update move_pfn_range_to_zone() to flag

Re: [PATCH] mm: Teach pfn_to_online_page() about ZONE_DEVICE section collisions

2021-01-06 Thread Michal Hocko
On Tue 05-01-21 20:07:18, Dan Williams wrote: > While pfn_to_online_page() is able to determine pfn_valid() at > subsection granularity it is not able to reliably determine if a given > pfn is also online if the section is mixed with ZONE_DEVICE pfns. I would call out the problem more explicitly.

[PATCH] mm: Teach pfn_to_online_page() about ZONE_DEVICE section collisions

2021-01-05 Thread Dan Williams
While pfn_to_online_page() is able to determine pfn_valid() at subsection granularity it is not able to reliably determine if a given pfn is also online if the section is mixed with ZONE_DEVICE pfns. Update move_pfn_range_to_zone() to flag (SECTION_TAINT_ZONE_DEVICE) a section that mixes