Re: [PATCH 1/1] arm64: reduce section size for sparsemem

2021-01-20 Thread Sudarshan Rajagopalan
On 2021-01-11 03:09, Anshuman Khandual wrote: + Catalin Hello Sudershan, Could you please change the subject line above as follows for better classifications and clarity. arm64/sparsemem: Reduce SECTION_SIZE_BITS On 1/9/21 4:46 AM, Sudarshan Rajagopalan wrote: Reducing the section size

[PATCH 1/1] arm64/sparsemem: reduce SECTION_SIZE_BITS

2021-01-20 Thread Sudarshan Rajagopalan
28MB to have PMD based vmemmap mapping with CONFIG_ARM64_4K_PAGES. Given these constraints, lets just reduce the section size to 128MB for 4K and 16K base page size configs, and to 512MB for 64K base page size config. Signed-off-by: Sudarshan Rajagopalan Suggested-by: Anshuman Khandual Suggest

[PATCH 0/1] arm64/sparsemem: reduce SECTION_SIZE_BITS

2021-01-20 Thread Sudarshan Rajagopalan
g/T/#m8ee60ae69db5e9eb06ca7999c43828d49ccb9626 Sudarshan Rajagopalan (1): arm64/sparsemem: reduce SECTION_SIZE_BITS arch/arm64/include/asm/sparsemem.h | 23 +-- 1 file changed, 21 insertions(+), 2 deletions(-) -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Li

Re: [PATCH 1/1] arm64: reduce section size for sparsemem

2021-01-20 Thread Sudarshan Rajagopalan
On 2021-01-20 09:49, Will Deacon wrote: On Fri, Jan 08, 2021 at 03:16:00PM -0800, Sudarshan Rajagopalan wrote: Reducing the section size helps reduce wastage of reserved memory for huge memory holes in sparsemem model. But having a much smaller section size bits could break PMD mappings

[PATCH] mm: vmscan: support equal reclaim for anon and file pages

2021-01-11 Thread Sudarshan Rajagopalan
When performing memory reclaim support treating anonymous and file backed pages equally. Swapping anonymous pages out to memory can be efficient enough to justify treating anonymous and file backed pages equally. Signed-off-by: Sudarshan Rajagopalan Cc: Andrew Morton --- mm/vmscan.c | 15

[PATCH 1/1] arm64: reduce section size for sparsemem

2021-01-08 Thread Sudarshan Rajagopalan
. Signed-off-by: Sudarshan Rajagopalan Suggested-by: David Hildenbrand Cc: Will Deacon Cc: Anshuman Khandual Cc: Mike Rapoport Cc: Mark Rutland Cc: Suren Baghdasaryan --- arch/arm64/include/asm/sparsemem.h | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/arm64

[PATCH 0/1] arm64: reduce section size for sparsemem

2021-01-08 Thread Sudarshan Rajagopalan
/#m8ee60ae69db5e9eb06ca7999c43828d49ccb9626 Sudarshan Rajagopalan (1): arm64: reduce section size for sparsemem arch/arm64/include/asm/sparsemem.h | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation

Re: [PATCH 1/1] arm64: make section size configurable for memory hotplug

2021-01-07 Thread Sudarshan Rajagopalan
./scripts/get_maintainer.pl patch.patch to get the maintainers list. It somehow didn't mention LAKML. I've added the mailing list to this thread. On 1/6/21 6:58 AM, Sudarshan Rajagopalan wrote: Currently on arm64, memory section size is hard-coded to 1GB. Make this configurable if memory

[PATCH 1/1] arm64: make section size configurable for memory hotplug

2021-01-05 Thread Sudarshan Rajagopalan
Currently on arm64, memory section size is hard-coded to 1GB. Make this configurable if memory-hotplug is enabled, to support more finer granularity for hotplug-able memory. Signed-off-by: Sudarshan Rajagopalan --- arch/arm64/Kconfig | 11 +++ arch/arm64/include/asm

[PATCH 0/1] arm64: make section size configurable for memory hotplug

2021-01-05 Thread Sudarshan Rajagopalan
to hotplug out atleast 1 memblock from kernel POV. Section sizes of DDRs vary based on specs (number of ranks, channels, regions etc.) Making this section size configurable helps users to assign based on the DDR being used. The default is set to 1GB which is the current memblock size. Sudarshan

[PATCH] mm: vmscan: support complete shrinker reclaim

2021-01-05 Thread Sudarshan Rajagopalan
aggressively call the shrinkers during background memory reclaim, inorder to avoid hurting the performance of direct memory reclaim. Signed-off-by: Sudarshan Rajagopalan Cc: Andrew Morton --- mm/vmscan.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mm/vmscan.c b/mm

[RFC] depopulate_range_driver_managed() for removing page-table mappings for hot-added memory blocks

2020-11-13 Thread Sudarshan Rajagopalan
Hello, When memory blocks are removed, along with removing the memmap entries, memory resource and memory block devices, the arch specific arch_remove_memory() is called which takes care of tearing down the page-tables. Suppose there’s a usecase where the removed memory blocks will be

Re: [PATCH v4] arm64/mm: add fallback option to allocate virtually contiguous memory

2020-11-04 Thread Sudarshan Rajagopalan
On 2020-10-16 11:56, Sudarshan Rajagopalan wrote: Hello Will, Catalin, Did you have a chance to review this patch? It is reviewed by others and haven't seen any Nacks. This patch will be useful to have so that memory hotremove doesn't fail when such PMD_SIZE pages aren't available.. which

Re: mm/memblock: export memblock_{start/end}_of_DRAM

2020-11-03 Thread Sudarshan Rajagopalan
On 2020-10-30 01:38, Mike Rapoport wrote: On Thu, Oct 29, 2020 at 02:29:27PM -0700, Sudarshan Rajagopalan wrote: Hello all, We have a usecase where a module driver adds certain memory blocks using add_memory_driver_managed(), so that it can perform memory hotplug operations on these blocks

Re: mm/memblock: export memblock_{start/end}_of_DRAM

2020-11-03 Thread Sudarshan Rajagopalan
On 2020-10-29 23:41, David Hildenbrand wrote: On 29.10.20 22:29, Sudarshan Rajagopalan wrote: Hello all, Hi! Hi David.. thanks for the response as always. We have a usecase where a module driver adds certain memory blocks using add_memory_driver_managed(), so that it can perform memory

mm/memblock: export memblock_{start/end}_of_DRAM

2020-10-29 Thread Sudarshan Rajagopalan
Hello all, We have a usecase where a module driver adds certain memory blocks using add_memory_driver_managed(), so that it can perform memory hotplug operations on these blocks. In general, these memory blocks aren’t something that gets physically added later, but is part of actual RAM that

Re: arm64: dropping prevent_bootmem_remove_notifier

2020-10-29 Thread Sudarshan Rajagopalan
0 04:41 AM, Sudarshan Rajagopalan wrote: Hello Anshuman, In the patch that enables memory hot-remove (commit bbd6ec605c0f ("arm64/mm: Enable memory hot remove")) for arm64, there’s a notifier put in place that prevents boot memory from being offlined and removed. Also commit text menti

[PATCH 2/2] arm64: allow hotpluggable sections to be offlined

2020-10-16 Thread Sudarshan Rajagopalan
certain boot mem sections to be offlined. Signed-off-by: Sudarshan Rajagopalan Cc: Catalin Marinas Cc: Will Deacon Cc: Anshuman Khandual Cc: Mark Rutland Cc: Gavin Shan Cc: Logan Gunthorpe Cc: David Hildenbrand Cc: Andrew Morton Cc: Steven Price Cc: Suren Baghdasaryan --- arch/arm64/mm

[PATCH 1/2] mm/memory_hotplug: allow marking of memory sections as hotpluggable

2020-10-16 Thread Sudarshan Rajagopalan
t. Signed-off-by: Sudarshan Rajagopalan Cc: Catalin Marinas Cc: Will Deacon Cc: Mike Rapoport Cc: Anshuman Khandual Cc: David Hildenbrand Cc: Mark Rutland Cc: Steven Price Cc: Logan Gunthorpe Cc: Suren Baghdasaryan --- include/linux/memory_hotplug.h | 1 + include/linux/mmzone.h

[PATCH 0/2] mm/memory_hotplug, arm64: allow certain bootmem sections to be offlinable

2020-10-16 Thread Sudarshan Rajagopalan
ow boot mem sections that are marked as hotpluggable with this bit set to be offlined and removed. Thereby allowing required bootmem sections to be offlinable. Sudarshan Rajagopalan (2): mm/memory_hotplug: allow marking of memory sections as hotpluggable arm64: allow hotpluggable sections t

arm64: dropping prevent_bootmem_remove_notifier

2020-10-16 Thread Sudarshan Rajagopalan
Hello Anshuman, In the patch that enables memory hot-remove (commit bbd6ec605c0f ("arm64/mm: Enable memory hot remove")) for arm64, there’s a notifier put in place that prevents boot memory from being offlined and removed. Also commit text mentions that boot memory on arm64 cannot be

Re: [PATCH v3] arm64/mm: add fallback option to allocate virtually contiguous memory

2020-10-16 Thread Sudarshan Rajagopalan
On 2020-10-15 01:36, Will Deacon wrote: On Wed, Oct 14, 2020 at 05:51:23PM -0700, Sudarshan Rajagopalan wrote: When section mappings are enabled, we allocate vmemmap pages from physically continuous memory of size PMD_SIZE using vmemmap_alloc_block_buf(). Section mappings are good to reduce TLB

Re: [PATCH v3] arm64/mm: add fallback option to allocate virtually contiguous memory

2020-10-14 Thread Sudarshan Rajagopalan
On 2020-10-13 04:38, Anshuman Khandual wrote: On 10/13/2020 04:35 AM, Sudarshan Rajagopalan wrote: When section mappings are enabled, we allocate vmemmap pages from physically continuous memory of size PMD_SIZE using vmemmap_alloc_block_buf(). Section mappings are good to reduce TLB pressure

[PATCH v3] arm64/mm: add fallback option to allocate virtually contiguous memory

2020-10-14 Thread Sudarshan Rajagopalan
that such physically continuous memory allocations can fail. Rather than failing the memory hot-add procedure, add a fallback option to allocate vmemmap pages from discontinuous pages using vmemmap_populate_basepages(). Signed-off-by: Sudarshan Rajagopalan Reviewed-by: Gavin Shan Reviewed

[PATCH v3] arm64/mm: add fallback option to allocate virtually contiguous memory

2020-10-14 Thread Sudarshan Rajagopalan
. Sudarshan Rajagopalan (1): arm64/mm: add fallback option to allocate virtually contiguous memory arch/arm64/mm/mmu.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

[PATCH v3] arm64/mm: add fallback option to allocate virtually contiguous memory

2020-10-12 Thread Sudarshan Rajagopalan
that such physically continuous memory allocations can fail. Rather than failing the memory hot-add procedure, add a fallback option to allocate vmemmap pages from discontinuous pages using vmemmap_populate_basepages(). Signed-off-by: Sudarshan Rajagopalan Reviewed-by: Gavin Shan Cc: Catalin Marinas

[PATCH v3] arm64/mm: add fallback option to allocate virtually contiguous memory

2020-10-12 Thread Sudarshan Rajagopalan
. Sudarshan Rajagopalan (1): arm64/mm: add fallback option to allocate virtually contiguous memory arch/arm64/mm/mmu.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

[PATCH v3] arm64/mm: add fallback option to allocate virtually contiguous memory

2020-10-01 Thread Sudarshan Rajagopalan
that such physically continuous memory allocations can fail. Rather than failing the memory hot-add procedure, add a fallback option to allocate vmemmap pages from discontinuous pages using vmemmap_populate_basepages(). Signed-off-by: Sudarshan Rajagopalan Cc: Catalin Marinas Cc: Will Deacon Cc

[PATCH v3] arm64/mm: add fallback option to allocate virtually

2020-10-01 Thread Sudarshan Rajagopalan
required. Sudarshan Rajagopalan (1): arm64/mm: add fallback option to allocate virtually contiguous memory arch/arm64/mm/mmu.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative

Re: [PATCH v2] arm64/mm: add fallback option to allocate virtually contiguous memory

2020-10-01 Thread Sudarshan Rajagopalan
On 2020-09-30 17:30, Anshuman Khandual wrote: On 10/01/2020 04:43 AM, Sudarshan Rajagopalan wrote: When section mappings are enabled, we allocate vmemmap pages from physically continuous memory of size PMD_SIZE using vmemmap_alloc_block_buf(). Section mappings are good to reduce TLB pressure

[PATCH v2] arm64/mm: add fallback option to allocate virtually contiguous memory

2020-09-30 Thread Sudarshan Rajagopalan
that such physically continuous memory allocations can fail. Rather than failing the memory hot-add procedure, add a fallback option to allocate vmemmap pages from discontinuous pages using vmemmap_populate_basepages(). Signed-off-by: Sudarshan Rajagopalan Cc: Catalin Marinas Cc: Will Deacon Cc

[PATCH v2] arm64/mm: add fallback option to allocate virtually

2020-09-30 Thread Sudarshan Rajagopalan
V2: Allocates virtually contiguous memory only for sections that failed PMD_SIZE allocation, and continues to allocate physically contiguous memory for other sections. Sudarshan Rajagopalan (1): arm64/mm: add fallback option to allocate virtually contiguous memory arch/arm64/mm/mmu.c | 14

[PATCH] arm64/mm: add fallback option to allocate virtually contiguous memory

2020-09-10 Thread Sudarshan Rajagopalan
that such physically continuous memory allocations can fail. Rather than failing the memory hot-add procedure, add a fallback option to allocate vmemmap pages from discontinuous pages using vmemmap_populate_basepages(). Signed-off-by: Sudarshan Rajagopalan Cc: Catalin Marinas Cc: Will Deacon Cc