We should do the 1G block size as a fix, and backport it, and then make the hot 
unplug code smarter.

cheers

On 8 September 2017 11:15:47 am AEST, Anton Blanchard <an...@ozlabs.org> wrote:
>Hi Reza,
>
>> I may be misunderstanding this, but what if we did something like x86
>
>> does? When trying to unplug a region smaller than the mapping, they
>> fill that part of the pagetable with 0xFD instead of freeing the
>> whole thing. Once the whole thing is 0xFD, free it.
>> 
>> See arch/x86/mm/init_64.c:remove_{pte,pmd,pud}_table()
>> 
>> ---%<---
>>      memset((void *)addr, PAGE_INUSE, next - addr);
>> 
>>      page_addr = page_address(pte_page(*pte));
>>      if (!memchr_inv(page_addr, PAGE_INUSE, PAGE_SIZE)) {
>>              ...
>>              pte_clear(&init_mm, addr, pte);
>>              ...
>>      }
>> ---%<---
>
>But you only have 1GB ptes at this point, you'd need to start
>instantiating a new level in the tree, and populate 2MB ptes.
>
>That is what Ben is suggesting. I'm happy to go any way (fix hotplug
>to handle this, or increase the memblock size on PowerNV to 1GB), I
>just
>need a solution.
>
>Anton

-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

Reply via email to