Skip to contentSkip to conversation

docs/kernel-parameters: update description of mem=

PATCH Superseded Mike Rapoport 3 participants 4 messages Mar 9, 2022

Subsystems (3)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 docs/kernel-parameters: update description of mem=

From: Mike Rapoport <[email protected]>

The existing description of mem= does not cover all the cases and differences between how architectures treat it.

Extend the description to match the code.

---

This is in a way a followup for the discussion of mem= usage on MIPS:

https://lore.kernel.org/all/[email protected]

 .../admin-guide/kernel-parameters.txt         | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)
Documentation/admin-guide/kernel-parameters.txt +20 -0
index f5a27f067db9..f3597841a031 100644
@@ -2834,6 +2834,15 @@
 			2 when the kernel is not able to see the whole system memory;
 			3 memory that lies after 'mem=' boundary is excluded from
 			 the hypervisor, then assigned to KVM guests.
+			4 to limit the memory available for kdump kernel.
+
+			[ARC,MICROBLAZE] - the limit applies only to low memory,
+			high memory is not affected.
+
+			[ARM64] - only limits memory covered by the linear
+			mapping. The NOMAP regions are not affected.
+
+			[HEXAGON] - must be use to set the memory size, there is
 
 			[X86] Work as limiting max address. Use together
 			with memmap= to avoid physical address space collisions.
@@ -2844,6 +2853,17 @@
 			in above case 3, memory may need be hot added after boot
 			if system memory of hypervisor is not sufficient.
 
+	mem=nn[KMG]@ss[KMG]
+			[ARM,MIPS] - override the memory layout reported by
+			firmware.
+			Define a memory region of size nn[KMG] starting at
+			ss[KMG].
+			Multiple different regions can be specified with
+			multiple mem= parameters on the command line.
+
+	mem=nn[KMG]	[HEXAGON] Set the memory size.
+			Must be specified, otherwise memory size will be 0.
+
 	mem=nopentium	[BUGS=X86-32] Disable usage of 4MB pages for kernel
 			memory.
 
Signature · 1 line
2.34.1
reviewer
#1 lore raw

Hi Mike,

Quoted 24 lines · Mike Rapoport

From: Mike Rapoport <[email protected]>

The existing description of mem= does not cover all the cases and differences between how architectures treat it.

Extend the description to match the code.

---

This is in a way a followup for the discussion of mem= usage on MIPS:

https://lore.kernel.org/all/[email protected]

 .../admin-guide/kernel-parameters.txt         | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)
Documentation/admin-guide/kernel-parameters.txt +0 -0
index f5a27f067db9..f3597841a031 100644
@@ -2834,6 +2834,15 @@
 			2 when the kernel is not able to see the whole system memory;
 			3 memory that lies after 'mem=' boundary is excluded from

Documentation/admin-guide/kernel-parameters.txt line 2845

Quoted 10 lines
Documentation/admin-guide/kernel-parameters.txt +9 -0
 			 the hypervisor, then assigned to KVM guests.
+			4 to limit the memory available for kdump kernel.
+
+			[ARC,MICROBLAZE] - the limit applies only to low memory,
+			high memory is not affected.
+
+			[ARM64] - only limits memory covered by the linear
+			mapping. The NOMAP regions are not affected.
+
+			[HEXAGON] - must be use to set the memory size, there is

Above line seems to be missing something?

Otherwise looks good AFAIK.

Quoted 21 lines
Documentation/admin-guide/kernel-parameters.txt +11 -0
 			[X86] Work as limiting max address. Use together
 			with memmap= to avoid physical address space collisions.
@@ -2844,6 +2853,17 @@
 			in above case 3, memory may need be hot added after boot
 			if system memory of hypervisor is not sufficient.
 
+	mem=nn[KMG]@ss[KMG]
+			[ARM,MIPS] - override the memory layout reported by
+			firmware.
+			Define a memory region of size nn[KMG] starting at
+			ss[KMG].
+			Multiple different regions can be specified with
+			multiple mem= parameters on the command line.
+
+	mem=nn[KMG]	[HEXAGON] Set the memory size.
+			Must be specified, otherwise memory size will be 0.
+
 	mem=nopentium	[BUGS=X86-32] Disable usage of 4MB pages for kernel
 			memory.
 
Signature · 1 line
~Randy
#2 lore raw
Quoted 31 lines · Randy Dunlap

Hi Mike,

Quoted 28 lines · Mike Rapoport

From: Mike Rapoport <[email protected]>

The existing description of mem= does not cover all the cases and differences between how architectures treat it.

Extend the description to match the code.

---

This is in a way a followup for the discussion of mem= usage on MIPS:

https://lore.kernel.org/all/[email protected]

 .../admin-guide/kernel-parameters.txt         | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)
Documentation/admin-guide/kernel-parameters.txt +3 -0
index f5a27f067db9..f3597841a031 100644
@@ -2834,6 +2834,15 @@
 			2 when the kernel is not able to see the whole system memory;
 			3 memory that lies after 'mem=' boundary is excluded from
 			 the hypervisor, then assigned to KVM guests.
+			4 to limit the memory available for kdump kernel.
+
+			[ARC,MICROBLAZE] - the limit applies only to low memory,
Quoted 8 lines

Documentation/admin-guide/kernel-parameters.txt line 2845

Quoted 6 lines
Documentation/admin-guide/kernel-parameters.txt +6 -0
+			high memory is not affected.
+
+			[ARM64] - only limits memory covered by the linear
+			mapping. The NOMAP regions are not affected.
+
+			[HEXAGON] - must be use to set the memory size, there is

Above line seems to be missing something?

Yes :)

Quoted 26 lines

Otherwise looks good AFAIK.

Quoted 21 lines
Documentation/admin-guide/kernel-parameters.txt +11 -0
 			[X86] Work as limiting max address. Use together
 			with memmap= to avoid physical address space collisions.
@@ -2844,6 +2853,17 @@
 			in above case 3, memory may need be hot added after boot
 			if system memory of hypervisor is not sufficient.
 
+	mem=nn[KMG]@ss[KMG]
+			[ARM,MIPS] - override the memory layout reported by
+			firmware.
+			Define a memory region of size nn[KMG] starting at
+			ss[KMG].
+			Multiple different regions can be specified with
+			multiple mem= parameters on the command line.
+
+	mem=nn[KMG]	[HEXAGON] Set the memory size.
+			Must be specified, otherwise memory size will be 0.
+
 	mem=nopentium	[BUGS=X86-32] Disable usage of 4MB pages for kernel
 			memory.
 
Signature · 1 line
~Randy
Signature · 2 lines
Sincerely yours,
Mike.
#3 lore raw
In reply to Mike Rapoport
Quoted 24 lines · Mike Rapoport

From: Mike Rapoport <[email protected]>

The existing description of mem= does not cover all the cases and differences between how architectures treat it.

Extend the description to match the code.

---

This is in a way a followup for the discussion of mem= usage on MIPS:

https://lore.kernel.org/all/[email protected]

 .../admin-guide/kernel-parameters.txt         | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)
Documentation/admin-guide/kernel-parameters.txt +0 -0
index f5a27f067db9..f3597841a031 100644
@@ -2834,6 +2834,15 @@
 			2 when the kernel is not able to see the whole system memory;
 			3 memory that lies after 'mem=' boundary is excluded from

Documentation/admin-guide/kernel-parameters.txt line 2845

Quoted 10 lines
Documentation/admin-guide/kernel-parameters.txt +9 -0
 			 the hypervisor, then assigned to KVM guests.
+			4 to limit the memory available for kdump kernel.
+
+			[ARC,MICROBLAZE] - the limit applies only to low memory,
+			high memory is not affected.
+
+			[ARM64] - only limits memory covered by the linear
+			mapping. The NOMAP regions are not affected.
+
+			[HEXAGON] - must be use

Used?

Quoted 1 line

to set the memory size, there is

What? :-)

[...]

MBR, Sergey