Re: [PATCH] mm/hotplug: fix an imbalance with DEBUG_PAGEALLOC
From: Michal Hocko
Date: Tue Feb 26 2019 - 14:40:28 EST
On Tue 26-02-19 14:19:42, Qian Cai wrote:
> On Tue, 2019-02-26 at 19:20 +0100, Michal Hocko wrote:
> > Btw. what happens if the offlined pfn range is removed completely? Is
> > the range still mapped? What kind of consequences does this have?
>
> Well, the pages are still marked as reserved as well, so it is up to the
> physically memory hotplug handler to free kernel direct mapping pagetable,
> virtual memory mapping pages, and virtual memory mapping pagetable as by design,
> although I have no way to test it.
>
> > Also when does this tweak happens on a completely new hotplugged memory
> > range?
>
> I suppose it will call online_pages() which in-turn call
> kernel_unmap_linear_page() which may or may not have the same issue, but I have
> no way to test that path.
It seems you have missed the point of my question. It simply doesn't
make much sense to have offline memory mapped. That memory is not
accessible in general. So mapping it at the offline time is dubious at
best. Also you do not get through the offlining phase on a newly
hotplugged (and not yet onlined) memory. So the patch doesn't look
correct to me and it all smells like the bug you are seeing is a wrong
reporting.
I might be wrong here of course, because I didn't really get to study
the code very deeply. But then the changelog needs to elaborate much
more than, it bugs on so we make it to not bug.
--
Michal Hocko
SUSE Labs