mbox series

[0/6] arm64/mm: Enable memory hot remove and ZONE_DEVICE

Message ID 1554265806-11501-1-git-send-email-anshuman.khandual@arm.com (mailing list archive)
Headers show
Series arm64/mm: Enable memory hot remove and ZONE_DEVICE | expand

Message

Anshuman Khandual April 3, 2019, 4:30 a.m. UTC
This series enables memory hot remove on arm64, fixes a memblock removal
ordering problem in generic __remove_memory(), enables sysfs memory probe
interface on arm64. It also enables ZONE_DEVICE with struct vmem_altmap
support.

Testing:

Tested hot remove on arm64 for all 4K, 16K, 64K page config options with
all possible VA_BITS and PGTABLE_LEVELS combinations. Tested ZONE_DEVICE
with ARM64_4K_PAGES through a dummy driver.

Build tested on non arm64 platforms. I will appreciate if folks can test
arch_remove_memory() re-ordering in __remove_memory() on other platforms.

Dependency:

V5 series in the thread (https://lkml.org/lkml/2019/2/14/1096) will make
kernel linear mapping loose pgtable_page_ctor() init. When this happens
the proposed functions free_pte|pmd|pud_table() in [PATCH 2/6] will have
to stop calling pgtable_page_dtor().

Anshuman Khandual (5):
  arm64/mm: Enable sysfs based memory hot add interface
  arm64/mm: Enable memory hot remove
  arm64/mm: Enable struct page allocation from device memory
  mm/hotplug: Reorder arch_remove_memory() call in __remove_memory()
  arm64/mm: Enable ZONE_DEVICE

Robin Murphy (1):
  mm/memremap: Rename and consolidate SECTION_SIZE

 arch/arm64/Kconfig               |  13 +++
 arch/arm64/include/asm/pgtable.h |  14 +++
 arch/arm64/mm/mmu.c              | 242 ++++++++++++++++++++++++++++++++++++++-
 include/linux/mmzone.h           |   1 +
 kernel/memremap.c                |  10 +-
 mm/hmm.c                         |   2 -
 mm/memory_hotplug.c              |   3 +-
 7 files changed, 271 insertions(+), 14 deletions(-)

Comments

Dan Williams April 3, 2019, 6:08 p.m. UTC | #1
On Tue, Apr 2, 2019 at 9:30 PM Anshuman Khandual
<anshuman.khandual@arm.com> wrote:
>
> This series enables memory hot remove on arm64, fixes a memblock removal
> ordering problem in generic __remove_memory(), enables sysfs memory probe
> interface on arm64. It also enables ZONE_DEVICE with struct vmem_altmap
> support.
>
> Testing:
>
> Tested hot remove on arm64 for all 4K, 16K, 64K page config options with
> all possible VA_BITS and PGTABLE_LEVELS combinations. Tested ZONE_DEVICE
> with ARM64_4K_PAGES through a dummy driver.
>
> Build tested on non arm64 platforms. I will appreciate if folks can test
> arch_remove_memory() re-ordering in __remove_memory() on other platforms.
>
> Dependency:
>
> V5 series in the thread (https://lkml.org/lkml/2019/2/14/1096) will make
> kernel linear mapping loose pgtable_page_ctor() init. When this happens
> the proposed functions free_pte|pmd|pud_table() in [PATCH 2/6] will have
> to stop calling pgtable_page_dtor().

Hi Anshuman,

I'd be interested to integrate this with the sub-section hotplug
support [1]. Otherwise the padding implementation in libnvdimm can't
be removed unless all ZONE_DEVICE capable archs also agree on the
minimum arch_add_memory() granularity. I'd prefer not to special case
which archs support which granularity, but it unfortunately
complicates what you're trying to achieve.

I think at a minimum we, mm hotplug co-travellers, need to come to a
consensus on whether sub-section support is viable for v5.2 and / or a
pre-requisite for new arch-ZONE_DEVICE implementations.
Anshuman Khandual April 4, 2019, 1:11 p.m. UTC | #2
On 04/03/2019 11:38 PM, Dan Williams wrote:
> On Tue, Apr 2, 2019 at 9:30 PM Anshuman Khandual
> <anshuman.khandual@arm.com> wrote:
>>
>> This series enables memory hot remove on arm64, fixes a memblock removal
>> ordering problem in generic __remove_memory(), enables sysfs memory probe
>> interface on arm64. It also enables ZONE_DEVICE with struct vmem_altmap
>> support.
>>
>> Testing:
>>
>> Tested hot remove on arm64 for all 4K, 16K, 64K page config options with
>> all possible VA_BITS and PGTABLE_LEVELS combinations. Tested ZONE_DEVICE
>> with ARM64_4K_PAGES through a dummy driver.
>>
>> Build tested on non arm64 platforms. I will appreciate if folks can test
>> arch_remove_memory() re-ordering in __remove_memory() on other platforms.
>>
>> Dependency:
>>
>> V5 series in the thread (https://lkml.org/lkml/2019/2/14/1096) will make
>> kernel linear mapping loose pgtable_page_ctor() init. When this happens
>> the proposed functions free_pte|pmd|pud_table() in [PATCH 2/6] will have
>> to stop calling pgtable_page_dtor().
> 
> Hi Anshuman,

Hello Dan,

> 
> I'd be interested to integrate this with the sub-section hotplug
> support [1]. Otherwise the padding implementation in libnvdimm can't
> be removed unless all ZONE_DEVICE capable archs also agree on the
> minimum arch_add_memory() granularity. I'd prefer not to special case
> which archs support which granularity, but it unfortunately
> complicates what you're trying to achieve.

Sorry I have not been following your series on sub-section hotplug support.
Hence might not have the full context here. Could you please give some more
details on what exactly might be a problem.

> 
> I think at a minimum we, mm hotplug co-travellers, need to come to a
> consensus on whether sub-section support is viable for v5.2 and / or a
> pre-requisite for new arch-ZONE_DEVICE implementations

I would need to go through sub-section hotplug series first to understand
the pre-requisite. Do we need to support sub-section hotplug first before
being able to enable ZONE_DEVICE ?

- Anshuman