All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] arm64: add support for 43bit physical address
@ 2018-07-02 21:04 ` Nikunj Kela
  0 siblings, 0 replies; 10+ messages in thread
From: Nikunj Kela @ 2018-07-02 21:04 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon; +Cc: xe-kernel, linux-arm-kernel, linux-kernel

This patch adds support for 43bit physical address. Additionally,
this patch adds support for 27bit section size. This is useful in
reducing kernel memory usage. One usecase is in kdump kernel.

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

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index edf327f..76d0bfb 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -665,6 +665,9 @@ choice
 	  Choose the maximum physical address range that the kernel will
 	  support.
 
+config ARM64_PA_BITS_43
+	bool "43-bit"
+
 config ARM64_PA_BITS_48
 	bool "48-bit"
 
@@ -684,6 +687,7 @@ endchoice
 
 config ARM64_PA_BITS
 	int
+	default 43 if ARM64_PA_BITS_43
 	default 48 if ARM64_PA_BITS_48
 	default 52 if ARM64_PA_BITS_52
 
@@ -693,6 +697,9 @@ choice
 	help
 	  Choose the maximum amount of memory in a section.
 
+config ARM64_SEC_BITS_27
+	bool "27-bit"
+
 config ARM64_SEC_BITS_30
 	bool "30-bit"
 
@@ -700,6 +707,7 @@ endchoice
 
 config ARM64_SEC_BITS
 	int
+	default 27 if ARM64_SEC_BITS_27
 	default 30 if ARM64_SEC_BITS_30
 
 config CPU_BIG_ENDIAN
-- 
2.5.0


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

* [PATCH 2/2] arm64: add support for 43bit physical address
@ 2018-07-02 21:04 ` Nikunj Kela
  0 siblings, 0 replies; 10+ messages in thread
From: Nikunj Kela @ 2018-07-02 21:04 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adds support for 43bit physical address. Additionally,
this patch adds support for 27bit section size. This is useful in
reducing kernel memory usage. One usecase is in kdump kernel.

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

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index edf327f..76d0bfb 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -665,6 +665,9 @@ choice
 	  Choose the maximum physical address range that the kernel will
 	  support.
 
+config ARM64_PA_BITS_43
+	bool "43-bit"
+
 config ARM64_PA_BITS_48
 	bool "48-bit"
 
@@ -684,6 +687,7 @@ endchoice
 
 config ARM64_PA_BITS
 	int
+	default 43 if ARM64_PA_BITS_43
 	default 48 if ARM64_PA_BITS_48
 	default 52 if ARM64_PA_BITS_52
 
@@ -693,6 +697,9 @@ choice
 	help
 	  Choose the maximum amount of memory in a section.
 
+config ARM64_SEC_BITS_27
+	bool "27-bit"
+
 config ARM64_SEC_BITS_30
 	bool "30-bit"
 
@@ -700,6 +707,7 @@ endchoice
 
 config ARM64_SEC_BITS
 	int
+	default 27 if ARM64_SEC_BITS_27
 	default 30 if ARM64_SEC_BITS_30
 
 config CPU_BIG_ENDIAN
-- 
2.5.0

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

* Re: [PATCH 2/2] arm64: add support for 43bit physical address
  2018-07-02 21:04 ` Nikunj Kela
@ 2018-07-03 14:56   ` Catalin Marinas
  -1 siblings, 0 replies; 10+ messages in thread
From: Catalin Marinas @ 2018-07-03 14:56 UTC (permalink / raw)
  To: Nikunj Kela; +Cc: Will Deacon, xe-kernel, linux-kernel, linux-arm-kernel

On Mon, Jul 02, 2018 at 02:04:51PM -0700, Nikunj Kela wrote:
> This patch adds support for 43bit physical address. Additionally,
> this patch adds support for 27bit section size. This is useful in
> reducing kernel memory usage. One usecase is in kdump kernel.

Some numbers please.

-- 
Catalin

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

* [PATCH 2/2] arm64: add support for 43bit physical address
@ 2018-07-03 14:56   ` Catalin Marinas
  0 siblings, 0 replies; 10+ messages in thread
From: Catalin Marinas @ 2018-07-03 14:56 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 02, 2018 at 02:04:51PM -0700, Nikunj Kela wrote:
> This patch adds support for 43bit physical address. Additionally,
> this patch adds support for 27bit section size. This is useful in
> reducing kernel memory usage. One usecase is in kdump kernel.

Some numbers please.

-- 
Catalin

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

* Re: [PATCH 2/2] arm64: add support for 43bit physical address
  2018-07-03 14:56   ` Catalin Marinas
@ 2018-07-03 18:35     ` Nikunj Kela (nkela)
  -1 siblings, 0 replies; 10+ messages in thread
From: Nikunj Kela (nkela) @ 2018-07-03 18:35 UTC (permalink / raw)
  To: Catalin Marinas; +Cc: Will Deacon, xe-kernel, linux-kernel, linux-arm-kernel

We are trying to reduce the memory allocation needed for kdump kernel. We want to reserve less than 32M for kdump kernel if possible. We are able to get ~14M saving by the proposed change. Below are the numbers before and after the proposed change:

With 48 bit physical address and 30 bit section size:
--------------------------------------------------------------------

Memory: 23052K/49152K available (3460K kernel code, 296K rwdata, 2436K rodata, 204K init, 179K bss, 26100K reserved, 0K cma-reserved)

With 43 bit physical address and 27bit section size:
--------------------------------------------------------------------

Memory: 37284K/49152K available (3596K kernel code, 296K rwdata, 2408K rodata, 208K init, 173K bss, 11868K reserved, 0K cma-reserved)

Thanks,
-Nikunj
________________________________________
From: Catalin Marinas <catalin.marinas@arm.com>
Sent: Tuesday, July 3, 2018 7:56 AM
To: Nikunj Kela (nkela)
Cc: Will Deacon; xe-kernel@external.cisco.com; linux-kernel@vger.kernel.org; linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/2] arm64: add support for 43bit physical address

On Mon, Jul 02, 2018 at 02:04:51PM -0700, Nikunj Kela wrote:
> This patch adds support for 43bit physical address. Additionally,
> this patch adds support for 27bit section size. This is useful in
> reducing kernel memory usage. One usecase is in kdump kernel.

Some numbers please.

--
Catalin

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

* [PATCH 2/2] arm64: add support for 43bit physical address
@ 2018-07-03 18:35     ` Nikunj Kela (nkela)
  0 siblings, 0 replies; 10+ messages in thread
From: Nikunj Kela (nkela) @ 2018-07-03 18:35 UTC (permalink / raw)
  To: linux-arm-kernel

We are trying to reduce the memory allocation needed for kdump kernel. We want to reserve less than 32M for kdump kernel if possible. We are able to get ~14M saving by the proposed change. Below are the numbers before and after the proposed change:

With 48 bit physical address and 30 bit section size:
--------------------------------------------------------------------

Memory: 23052K/49152K available (3460K kernel code, 296K rwdata, 2436K rodata, 204K init, 179K bss, 26100K reserved, 0K cma-reserved)

With 43 bit physical address and 27bit section size:
--------------------------------------------------------------------

Memory: 37284K/49152K available (3596K kernel code, 296K rwdata, 2408K rodata, 208K init, 173K bss, 11868K reserved, 0K cma-reserved)

Thanks,
-Nikunj
________________________________________
From: Catalin Marinas <catalin.marinas@arm.com>
Sent: Tuesday, July 3, 2018 7:56 AM
To: Nikunj Kela (nkela)
Cc: Will Deacon; xe-kernel at external.cisco.com; linux-kernel at vger.kernel.org; linux-arm-kernel at lists.infradead.org
Subject: Re: [PATCH 2/2] arm64: add support for 43bit physical address

On Mon, Jul 02, 2018 at 02:04:51PM -0700, Nikunj Kela wrote:
> This patch adds support for 43bit physical address. Additionally,
> this patch adds support for 27bit section size. This is useful in
> reducing kernel memory usage. One usecase is in kdump kernel.

Some numbers please.

--
Catalin

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

* Re: [PATCH 2/2] arm64: add support for 43bit physical address
  2018-07-03 18:35     ` Nikunj Kela (nkela)
@ 2018-07-05 18:34       ` Catalin Marinas
  -1 siblings, 0 replies; 10+ messages in thread
From: Catalin Marinas @ 2018-07-05 18:34 UTC (permalink / raw)
  To: Nikunj Kela (nkela)
  Cc: xe-kernel, Will Deacon, linux-kernel, linux-arm-kernel

On Tue, Jul 03, 2018 at 06:35:32PM +0000, Nikunj Kela (nkela) wrote:
> We are trying to reduce the memory allocation needed for kdump kernel.
> We want to reserve less than 32M for kdump kernel if possible. We are
> able to get ~14M saving by the proposed change.

Have you tried disabling SPARSEMEM and using FLATMEM for this case? With
32M you wouldn't need more than a section anyway. It needs some tweaking
of the arm64 Kconfig and probably fail to build.

-- 
Catalin

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

* [PATCH 2/2] arm64: add support for 43bit physical address
@ 2018-07-05 18:34       ` Catalin Marinas
  0 siblings, 0 replies; 10+ messages in thread
From: Catalin Marinas @ 2018-07-05 18:34 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jul 03, 2018 at 06:35:32PM +0000, Nikunj Kela (nkela) wrote:
> We are trying to reduce the memory allocation needed for kdump kernel.
> We want to reserve less than 32M for kdump kernel if possible. We are
> able to get ~14M saving by the proposed change.

Have you tried disabling SPARSEMEM and using FLATMEM for this case? With
32M you wouldn't need more than a section anyway. It needs some tweaking
of the arm64 Kconfig and probably fail to build.

-- 
Catalin

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

* Re: [PATCH 2/2] arm64: add support for 43bit physical address
  2018-07-05 18:34       ` Catalin Marinas
@ 2018-07-05 23:40         ` Nikunj Kela (nkela)
  -1 siblings, 0 replies; 10+ messages in thread
From: Nikunj Kela (nkela) @ 2018-07-05 23:40 UTC (permalink / raw)
  To: Catalin Marinas; +Cc: xe-kernel, Will Deacon, linux-kernel, linux-arm-kernel

I didn’t try FLATMEM. Thanks for advising, I enabled FLATMEM for ARM64 and am able to save ~14M. Will post a new patch for Kconfig changes.

Thanks,
-Nikunj

On 7/5/18, 11:35 AM, "Catalin Marinas" <catalin.marinas@arm.com> wrote:

    On Tue, Jul 03, 2018 at 06:35:32PM +0000, Nikunj Kela (nkela) wrote:
    > We are trying to reduce the memory allocation needed for kdump kernel.
    > We want to reserve less than 32M for kdump kernel if possible. We are
    > able to get ~14M saving by the proposed change.
    
    Have you tried disabling SPARSEMEM and using FLATMEM for this case? With
    32M you wouldn't need more than a section anyway. It needs some tweaking
    of the arm64 Kconfig and probably fail to build.
    
    -- 
    Catalin
    


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

* [PATCH 2/2] arm64: add support for 43bit physical address
@ 2018-07-05 23:40         ` Nikunj Kela (nkela)
  0 siblings, 0 replies; 10+ messages in thread
From: Nikunj Kela (nkela) @ 2018-07-05 23:40 UTC (permalink / raw)
  To: linux-arm-kernel

I didn?t try FLATMEM. Thanks for advising, I enabled FLATMEM for ARM64 and am able to save ~14M. Will post a new patch for Kconfig changes.

Thanks,
-Nikunj

On 7/5/18, 11:35 AM, "Catalin Marinas" <catalin.marinas@arm.com> wrote:

    On Tue, Jul 03, 2018 at 06:35:32PM +0000, Nikunj Kela (nkela) wrote:
    > We are trying to reduce the memory allocation needed for kdump kernel.
    > We want to reserve less than 32M for kdump kernel if possible. We are
    > able to get ~14M saving by the proposed change.
    
    Have you tried disabling SPARSEMEM and using FLATMEM for this case? With
    32M you wouldn't need more than a section anyway. It needs some tweaking
    of the arm64 Kconfig and probably fail to build.
    
    -- 
    Catalin
    

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

end of thread, other threads:[~2018-07-05 23:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-02 21:04 [PATCH 2/2] arm64: add support for 43bit physical address Nikunj Kela
2018-07-02 21:04 ` Nikunj Kela
2018-07-03 14:56 ` Catalin Marinas
2018-07-03 14:56   ` Catalin Marinas
2018-07-03 18:35   ` Nikunj Kela (nkela)
2018-07-03 18:35     ` Nikunj Kela (nkela)
2018-07-05 18:34     ` Catalin Marinas
2018-07-05 18:34       ` Catalin Marinas
2018-07-05 23:40       ` Nikunj Kela (nkela)
2018-07-05 23:40         ` Nikunj Kela (nkela)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.