* [PATCH 0/2] MIPS: Adjust SPARSEMEM Kconfigs
@ 2023-10-28 13:52 Jiaxun Yang
2023-10-28 13:52 ` [PATCH 1/2] MIPS: Enable SPARSEMEM option unconditionally on 64BIT Jiaxun Yang
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Jiaxun Yang @ 2023-10-28 13:52 UTC (permalink / raw)
To: Thomas Bogendoerfer; +Cc: linux-mips, linux-kernel, Jiaxun Yang
Hi,
This series adjusted some mm Kconfigs, mainly sparsemem related.
Hope it is not too late for 6.7 :-)
Thanks
- Jiaxun
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
Jiaxun Yang (2):
MIPS: Enable SPARSEMEM option unconditionally on 64BIT
MIPS: generic: Set SPARSEMEM by default for 64BIT kernel
arch/mips/Kconfig | 14 +++++++++-----
arch/mips/loongson2ef/Kconfig | 4 ++--
2 files changed, 11 insertions(+), 7 deletions(-)
---
base-commit: 66f1e1ea3548378ff6387b1ce0b40955d54e86aa
change-id: 20231028-mm-82dc717e9e49
Best regards,
--
Jiaxun Yang <jiaxun.yang@flygoat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] MIPS: Enable SPARSEMEM option unconditionally on 64BIT
2023-10-28 13:52 [PATCH 0/2] MIPS: Adjust SPARSEMEM Kconfigs Jiaxun Yang
@ 2023-10-28 13:52 ` Jiaxun Yang
2023-12-30 14:40 ` Thomas Bogendoerfer
2023-10-28 13:52 ` [PATCH 2/2] MIPS: generic: Set SPARSEMEM by default for 64BIT kernel Jiaxun Yang
2023-11-30 8:15 ` [PATCH 0/2] MIPS: Adjust SPARSEMEM Kconfigs Gregory CLEMENT
2 siblings, 1 reply; 5+ messages in thread
From: Jiaxun Yang @ 2023-10-28 13:52 UTC (permalink / raw)
To: Thomas Bogendoerfer; +Cc: linux-mips, linux-kernel, Jiaxun Yang
SPARSEMEM have been tested on Cavium and Loongson64 for a while
and we are confident that they are working properly on 64bit
systems.
Since it's almost certain for 64bit MIPS system to have a hole
in memory space, SPARSEMEM will be more efficent for them.
Also promote platforms marked with SPARSEMEM_ENABLE before
to SPARSEMEM_DEFAULT, as they tend to have huge holes in
address space.
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
arch/mips/Kconfig | 13 ++++++++-----
arch/mips/loongson2ef/Kconfig | 4 ++--
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 76db82542519..d12e8f3c1d08 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -460,7 +460,7 @@ config MACH_LOONGSON2EF
config MACH_LOONGSON64
bool "Loongson 64-bit family of machines"
- select ARCH_SPARSEMEM_ENABLE
+ select ARCH_SPARSEMEM_DEFAULT
select ARCH_MIGHT_HAVE_PC_PARPORT
select ARCH_MIGHT_HAVE_PC_SERIO
select GENERIC_ISA_DMA_SUPPORT_BROKEN
@@ -656,7 +656,7 @@ config SGI_IP22
config SGI_IP27
bool "SGI IP27 (Origin200/2000)"
select ARCH_HAS_PHYS_TO_DMA
- select ARCH_SPARSEMEM_ENABLE
+ select ARCH_SPARSEMEM_DEFAULT
select FW_ARC
select FW_ARC64
select ARC_CMDLINE_ONLY
@@ -923,7 +923,7 @@ config CAVIUM_OCTEON_SOC
select ZONE_DMA32
select GPIOLIB
select USE_OF
- select ARCH_SPARSEMEM_ENABLE
+ select ARCH_SPARSEMEM_DEFAULT
select SYS_SUPPORTS_SMP
select NR_CPUS_DEFAULT_64
select MIPS_NR_CPU_NR_MAP_1024
@@ -2573,10 +2573,13 @@ config CPU_SUPPORTS_MSA
config ARCH_FLATMEM_ENABLE
def_bool y
- depends on !NUMA && !CPU_LOONGSON2EF
config ARCH_SPARSEMEM_ENABLE
- bool
+ def_bool y
+ depends on 64BIT
+
+config ARCH_SELECT_MEMORY_MODEL
+ def_bool ARCH_SPARSEMEM_ENABLE
config NUMA
bool "NUMA Support"
diff --git a/arch/mips/loongson2ef/Kconfig b/arch/mips/loongson2ef/Kconfig
index f93eb6f42238..e593294b2995 100644
--- a/arch/mips/loongson2ef/Kconfig
+++ b/arch/mips/loongson2ef/Kconfig
@@ -6,7 +6,7 @@ choice
config LEMOTE_FULOONG2E
bool "Lemote Fuloong(2e) mini-PC"
- select ARCH_SPARSEMEM_ENABLE
+ select ARCH_SPARSEMEM_DEFAULT
select ARCH_HAS_PHYS_TO_DMA
select ARCH_MIGHT_HAVE_PC_PARPORT
select ARCH_MIGHT_HAVE_PC_SERIO
@@ -36,7 +36,7 @@ config LEMOTE_FULOONG2E
config LEMOTE_MACH2F
bool "Lemote Loongson 2F family machines"
- select ARCH_SPARSEMEM_ENABLE
+ select ARCH_SPARSEMEM_DEFAULT
select ARCH_HAS_PHYS_TO_DMA
select ARCH_MIGHT_HAVE_PC_PARPORT
select ARCH_MIGHT_HAVE_PC_SERIO
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] MIPS: generic: Set SPARSEMEM by default for 64BIT kernel
2023-10-28 13:52 [PATCH 0/2] MIPS: Adjust SPARSEMEM Kconfigs Jiaxun Yang
2023-10-28 13:52 ` [PATCH 1/2] MIPS: Enable SPARSEMEM option unconditionally on 64BIT Jiaxun Yang
@ 2023-10-28 13:52 ` Jiaxun Yang
2023-11-30 8:15 ` [PATCH 0/2] MIPS: Adjust SPARSEMEM Kconfigs Gregory CLEMENT
2 siblings, 0 replies; 5+ messages in thread
From: Jiaxun Yang @ 2023-10-28 13:52 UTC (permalink / raw)
To: Thomas Bogendoerfer; +Cc: linux-mips, linux-kernel, Jiaxun Yang
Select ARCH_SPARSEMEM_DEFAULT for 64bit generic kernel build,
as all platforms supported by 64bit generic kernel have a hole
in their address space.
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
arch/mips/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index d12e8f3c1d08..fad05f699efd 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -133,6 +133,7 @@ choice
config MIPS_GENERIC_KERNEL
bool "Generic board-agnostic MIPS kernel"
+ select ARCH_SPARSEMEM_DEFAULT if 64BIT
select MIPS_GENERIC
select BOOT_RAW
select BUILTIN_DTB
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] MIPS: Adjust SPARSEMEM Kconfigs
2023-10-28 13:52 [PATCH 0/2] MIPS: Adjust SPARSEMEM Kconfigs Jiaxun Yang
2023-10-28 13:52 ` [PATCH 1/2] MIPS: Enable SPARSEMEM option unconditionally on 64BIT Jiaxun Yang
2023-10-28 13:52 ` [PATCH 2/2] MIPS: generic: Set SPARSEMEM by default for 64BIT kernel Jiaxun Yang
@ 2023-11-30 8:15 ` Gregory CLEMENT
2 siblings, 0 replies; 5+ messages in thread
From: Gregory CLEMENT @ 2023-11-30 8:15 UTC (permalink / raw)
To: Jiaxun Yang, Thomas Bogendoerfer; +Cc: linux-mips, linux-kernel, Jiaxun Yang
Hello Jiaxun,
> Hi,
>
> This series adjusted some mm Kconfigs, mainly sparsemem related.
Following your feedback on my series adding support for EyeQ5[1]. I
tested those 2 patches and as expected it reduces a lot the memory
consumption, memap consumes 512 pages again while without these patches
it consumed 8672 pages.
You can add on both patches my
Tested-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Thanks,
Gregory
>
> Hope it is not too late for 6.7 :-)
>
> Thanks
> - Jiaxun
>
> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
> ---
> Jiaxun Yang (2):
> MIPS: Enable SPARSEMEM option unconditionally on 64BIT
> MIPS: generic: Set SPARSEMEM by default for 64BIT kernel
>
> arch/mips/Kconfig | 14 +++++++++-----
> arch/mips/loongson2ef/Kconfig | 4 ++--
> 2 files changed, 11 insertions(+), 7 deletions(-)
> ---
> base-commit: 66f1e1ea3548378ff6387b1ce0b40955d54e86aa
> change-id: 20231028-mm-82dc717e9e49
>
> Best regards,
> --
> Jiaxun Yang <jiaxun.yang@flygoat.com>
>
--
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] MIPS: Enable SPARSEMEM option unconditionally on 64BIT
2023-10-28 13:52 ` [PATCH 1/2] MIPS: Enable SPARSEMEM option unconditionally on 64BIT Jiaxun Yang
@ 2023-12-30 14:40 ` Thomas Bogendoerfer
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Bogendoerfer @ 2023-12-30 14:40 UTC (permalink / raw)
To: Jiaxun Yang; +Cc: linux-mips, linux-kernel
On Sat, Oct 28, 2023 at 02:52:16PM +0100, Jiaxun Yang wrote:
> SPARSEMEM have been tested on Cavium and Loongson64 for a while
> and we are confident that they are working properly on 64bit
> systems.
>
> Since it's almost certain for 64bit MIPS system to have a hole
> in memory space, SPARSEMEM will be more efficent for them.
>
> Also promote platforms marked with SPARSEMEM_ENABLE before
> to SPARSEMEM_DEFAULT, as they tend to have huge holes in
> address space.
>
> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
> ---
> arch/mips/Kconfig | 13 ++++++++-----
> arch/mips/loongson2ef/Kconfig | 4 ++--
> 2 files changed, 10 insertions(+), 7 deletions(-)
>
> diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> index 76db82542519..d12e8f3c1d08 100644
> --- a/arch/mips/Kconfig
> +++ b/arch/mips/Kconfig
> @@ -460,7 +460,7 @@ config MACH_LOONGSON2EF
>
> config MACH_LOONGSON64
> bool "Loongson 64-bit family of machines"
> - select ARCH_SPARSEMEM_ENABLE
> + select ARCH_SPARSEMEM_DEFAULT
> select ARCH_MIGHT_HAVE_PC_PARPORT
> select ARCH_MIGHT_HAVE_PC_SERIO
> select GENERIC_ISA_DMA_SUPPORT_BROKEN
> @@ -656,7 +656,7 @@ config SGI_IP22
> config SGI_IP27
> bool "SGI IP27 (Origin200/2000)"
> select ARCH_HAS_PHYS_TO_DMA
> - select ARCH_SPARSEMEM_ENABLE
> + select ARCH_SPARSEMEM_DEFAULT
> select FW_ARC
> select FW_ARC64
> select ARC_CMDLINE_ONLY
> @@ -923,7 +923,7 @@ config CAVIUM_OCTEON_SOC
> select ZONE_DMA32
> select GPIOLIB
> select USE_OF
> - select ARCH_SPARSEMEM_ENABLE
> + select ARCH_SPARSEMEM_DEFAULT
> select SYS_SUPPORTS_SMP
> select NR_CPUS_DEFAULT_64
> select MIPS_NR_CPU_NR_MAP_1024
> @@ -2573,10 +2573,13 @@ config CPU_SUPPORTS_MSA
>
> config ARCH_FLATMEM_ENABLE
> def_bool y
> - depends on !NUMA && !CPU_LOONGSON2EF
>
> config ARCH_SPARSEMEM_ENABLE
> - bool
> + def_bool y
> + depends on 64BIT
> +
> +config ARCH_SELECT_MEMORY_MODEL
> + def_bool ARCH_SPARSEMEM_ENABLE
maybe I'm blind, but I don't see ARCH_SPARSEMEM_DEFAULT declared in
Kconfig for MIPS. So what I'm missing ?
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-12-30 15:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-28 13:52 [PATCH 0/2] MIPS: Adjust SPARSEMEM Kconfigs Jiaxun Yang
2023-10-28 13:52 ` [PATCH 1/2] MIPS: Enable SPARSEMEM option unconditionally on 64BIT Jiaxun Yang
2023-12-30 14:40 ` Thomas Bogendoerfer
2023-10-28 13:52 ` [PATCH 2/2] MIPS: generic: Set SPARSEMEM by default for 64BIT kernel Jiaxun Yang
2023-11-30 8:15 ` [PATCH 0/2] MIPS: Adjust SPARSEMEM Kconfigs Gregory CLEMENT
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox