linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] arm64: add ARM64-specific support for flatmem
@ 2018-07-06 17:02 Nikunj Kela
  2018-07-06 17:06 ` Will Deacon
  0 siblings, 1 reply; 3+ messages in thread
From: Nikunj Kela @ 2018-07-06 17:02 UTC (permalink / raw)
  To: linux-arm-kernel

Flatmem is useful in reducing kernel memory usage.
One usecase is in kdump kernel. We are able to save
~14M by moving to flatmem scheme.

Cc: xe-kernel at external.cisco.com
Cc: Nikunj Kela <nkela@cisco.com>
Signed-off-by: Nikunj Kela <nkela@cisco.com>
---
 arch/arm64/Kconfig | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 42c090c..96ab9a7 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -775,6 +775,10 @@ config ARCH_SPARSEMEM_DEFAULT
 config ARCH_SELECT_MEMORY_MODEL
 	def_bool ARCH_SPARSEMEM_ENABLE
 
+config ARCH_FLATMEM_ENABLE
+	def_bool y
+	depends on !NUMA
+
 config HAVE_ARCH_PFN_VALID
 	def_bool ARCH_HAS_HOLES_MEMORYMODEL || !SPARSEMEM
 
-- 
2.10.3.dirty

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH v2] arm64: add ARM64-specific support for flatmem
  2018-07-06 17:02 [PATCH v2] arm64: add ARM64-specific support for flatmem Nikunj Kela
@ 2018-07-06 17:06 ` Will Deacon
  2018-07-06 17:16   ` Nikunj Kela (nkela)
  0 siblings, 1 reply; 3+ messages in thread
From: Will Deacon @ 2018-07-06 17:06 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jul 06, 2018 at 10:02:15AM -0700, Nikunj Kela wrote:
> Flatmem is useful in reducing kernel memory usage.
> One usecase is in kdump kernel. We are able to save
> ~14M by moving to flatmem scheme.
> 
> Cc: xe-kernel at external.cisco.com
> Cc: Nikunj Kela <nkela@cisco.com>
> Signed-off-by: Nikunj Kela <nkela@cisco.com>
> ---
>  arch/arm64/Kconfig | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 42c090c..96ab9a7 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -775,6 +775,10 @@ config ARCH_SPARSEMEM_DEFAULT
>  config ARCH_SELECT_MEMORY_MODEL
>  	def_bool ARCH_SPARSEMEM_ENABLE
>  
> +config ARCH_FLATMEM_ENABLE
> +	def_bool y
> +	depends on !NUMA

I still don't understand what this has to do with NUMA. SPARSEMEM is still
going to be what you want on a non-NUMA system with large holes in the
physical memory map, no?

Will

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v2] arm64: add ARM64-specific support for flatmem
  2018-07-06 17:06 ` Will Deacon
@ 2018-07-06 17:16   ` Nikunj Kela (nkela)
  0 siblings, 0 replies; 3+ messages in thread
From: Nikunj Kela (nkela) @ 2018-07-06 17:16 UTC (permalink / raw)
  To: linux-arm-kernel

I might be wrong but I was under the impression that Sparse memory is only of use on NUMA systems or systems supporting hot pluggable memory. the NODE_DATA() macro needs to be switched on NUMA, but not on FLATMEM. I borrowed this dependency from x86 Kconfig. If this is not needed, I will remove it.

Thanks,
-Nikunj

On 7/6/18, 10:05 AM, "Will Deacon" <will.deacon@arm.com> wrote:

    On Fri, Jul 06, 2018 at 10:02:15AM -0700, Nikunj Kela wrote:
    > Flatmem is useful in reducing kernel memory usage.
    > One usecase is in kdump kernel. We are able to save
    > ~14M by moving to flatmem scheme.
    > 
    > Cc: xe-kernel at external.cisco.com
    > Cc: Nikunj Kela <nkela@cisco.com>
    > Signed-off-by: Nikunj Kela <nkela@cisco.com>
    > ---
    >  arch/arm64/Kconfig | 4 ++++
    >  1 file changed, 4 insertions(+)
    > 
    > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
    > index 42c090c..96ab9a7 100644
    > --- a/arch/arm64/Kconfig
    > +++ b/arch/arm64/Kconfig
    > @@ -775,6 +775,10 @@ config ARCH_SPARSEMEM_DEFAULT
    >  config ARCH_SELECT_MEMORY_MODEL
    >  	def_bool ARCH_SPARSEMEM_ENABLE
    >  
    > +config ARCH_FLATMEM_ENABLE
    > +	def_bool y
    > +	depends on !NUMA
    
    I still don't understand what this has to do with NUMA. SPARSEMEM is still
    going to be what you want on a non-NUMA system with large holes in the
    physical memory map, no?
    
    Will
    

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-07-06 17:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-06 17:02 [PATCH v2] arm64: add ARM64-specific support for flatmem Nikunj Kela
2018-07-06 17:06 ` Will Deacon
2018-07-06 17:16   ` Nikunj Kela (nkela)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).