IA64: assign a distinguishable label to uncached memory in /proc/iomem
Subsystems (3)
PATCH 1/1 IA64: assign a distinguishable label to uncached memory in /proc/iomem
Currently a memory segment in memory map with attribute of EFI_MEMORY_UC is denoted as "System RAM" in /proc/iomem, while memory of attribute (EFI_MEMORY_WB|EFI_MEMORY_UC) is also labeled the same.
The kexec utility then includes uncached memory as part of vmcore. The kdump kernel MCA'ed when it tries to save the vmcore to a disk. A normal "cached" access may cause MCAs.
This patch would label memory with attribute of EFI_MEMORY_UC only as "Uncached RAM" so that kexec would know not to include it in the vmcore. I will submit a separate kexec-tools patch to the kexec list.
--- arch/ia64/kernel/efi.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
arch/ia64/kernel/efi.c +4 -3
@@ -1232,9 +1232,10 @@ efi_initialize_iomem_resources(struct reif (md->attribute &EFI_MEMORY_WP ) { name ="System ROM" ; flags |=IORESOURCE_READONLY ; - }else { - name ="System RAM" ; - } + }else if (md->attribute ==EFI_MEMORY_UC ) + name ="Uncached RAM" ; +else + name ="System RAM" ;break ;case EFI_ACPI_MEMORY_NVS :
Review
Quoted 7 lines · Jay Lan
(quoted diff) +4
-3- } else { - name = "System RAM"; - } + } else if (md->attribute = EFI_MEMORY_UC) + name = "Uncached RAM"; + else + name = "System RAM";
^^^^^^^^
Isn't that too much indent, i.e. shouldn't that be
arch/ia64/kernel/efi.c +1 -1
@@ -1232,9 +1232,10 @@ efi_initialize_iomem_resources(struct reif (md->attribute &EFI_MEMORY_WP ) { name ="System ROM" ; flags |=IORESOURCE_READONLY ; - }else { + } else if (md->attribute =
EFI_MEMORY_UC)
+ name = "Uncached RAM";
+ else
name = "System RAM";
- }
break;Bernhard
Quoted 1 line · Bernhard Walle
Isn't that too much indent, i.e. shouldn't that be
Of course
arch/ia64/kernel/efi.c +3 -2
@@ -1232,9 +1232,10 @@ efi_initialize_iomem_resources(struct reif (md->attribute &EFI_MEMORY_WP ) { name ="System ROM" ; flags |=IORESOURCE_READONLY ; - }else { + }else if (md->attribute =EFI_MEMORY_UC ) + name ="Uncached RAM" ; +else name ="System RAM" ; - }break ;case EFI_ACPI_MEMORY_NVS :
My mailer decided to wrap the pasted text (which is my fault).
Bernhard
Quoted 5 lines · Bernhard Walle
Quoted 1 line · Bernhard Walle
Isn't that too much indent, i.e. shouldn't that be
Of course
Yep! Thanks for correction.
jay
Quoted 27 lines
arch/ia64/kernel/efi.c +3
-2@@ -1232,9 +1232,10 @@ efi_initialize_iomem_resources(struct reif (md->attribute &EFI_MEMORY_WP ) { name ="System ROM" ; flags |=IORESOURCE_READONLY ; - }else { + }else if (md->attribute =EFI_MEMORY_UC ) + name ="Uncached RAM" ; +else name ="System RAM" ; - }break ;case EFI_ACPI_MEMORY_NVS :My mailer decided to wrap the pasted text (which is my fault).
Bernhard
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 8 lines · Jay Lan
Currently a memory segment in memory map with attribute of
EFI_MEMORY_UCis denoted as "System RAM" in/proc/iomem, while memory of attribute (EFI_MEMORY_WB|EFI_MEMORY_UC) is also labeled the same.The kexec utility then includes uncached memory as part of vmcore. The kdump kernel MCA'ed when it tries to save the vmcore to a disk. A normal "cached" access may cause MCAs.
Quoted 5 lines
This patch would label memory with attribute of
EFI_MEMORY_UConly as "Uncached RAM" so that kexec would know not to include it in the vmcore. I will submit a separate kexec-tools patch to the kexec list.Signed-off-by Jay Lan <[email protected]>
Hi Jay,
I've taken a look on an RX2620, Tiger2 and Tiger4 and none of these machines have EFI memory regions that are covered by this new check. That is, any regions with the EFI_MEMORY_UC bit set in the attribute either also have other attibute bits set, or are of a type not covered by this.
I strongly suspect that this is not a problem, but I wanted to bring it to your attention anyway. I can provide more detailed EFI information from any or all of these machines if you need it.
With regards to the kexec-tools portion of this patch, it looks fine to me and I don't think there will be any problem in merging it if/when the kernel portion is accepted.
Signature · 3 lines
Simon Horman VA Linux Systems Japan K.K., Sydney, Australia Satellite Office H: www.vergenet.net/~horms/ W: www.valinux.co.jp/en
Quoted 13 lines · Simon Horman
Quoted 12 lines · Jay Lan
Currently a memory segment in memory map with attribute of
EFI_MEMORY_UCis denoted as "System RAM" in/proc/iomem, while memory of attribute (EFI_MEMORY_WB|EFI_MEMORY_UC) is also labeled the same.The kexec utility then includes uncached memory as part of vmcore. The kdump kernel MCA'ed when it tries to save the vmcore to a disk. A normal "cached" access may cause MCAs.
This patch would label memory with attribute of
EFI_MEMORY_UConly as "Uncached RAM" so that kexec would know not to include it in the vmcore. I will submit a separate kexec-tools patch to the kexec list.
Quoted 8 lines
Quoted 1 line
Signed-off-by Jay Lan <[email protected]>Hi Jay,
I've taken a look on an RX2620, Tiger2 and Tiger4 and none of these machines have EFI memory regions that are covered by this new check. That is, any regions with the
EFI_MEMORY_UCbit set in the attribute either also have other attibute bits set, or are of a type not covered by this.
Great! So the change affects most likely only SGI Altix machines. Below is the EFI memory regions of one node of an Altix machine:
PAL_code 0000000001000000-0000000001FFFFFF 0000000000001000
8000000000000009
MemMapIO 00000000FF000000-00000000FFFFFFFF 0000000000001000
8000000000000001
Unusable 0000006000000000-000000600000FFFF 0000000000000010
0000000000000009RT_data 0000006000010000-00000060000FFFFF 00000000000000F0
8000000000001001BS_data 0000006000100000-00000060003FFFFF 0000000000000300
0000000000000001RT_data 0000006000400000-0000006001FFFFFF 0000000000001C00
8000000000001009RT_data 0000006002000000-0000006002FFFFFF 0000000000001000
8000000000000009BS_data 0000006003000000-0000006033DFFFFF 0000000000030E00
0000000000000009
available 0000006033E00000-00000060F7FFFFFF 00000000000C4200 0000000000000009
MemMapIO 0000008000000000-0000009FFFFFFFFF 0000000002000000
8000000000000003
The first BS_data region starting at 0x0000006000100000 is the case. That memory is part of Altix "fetchop" space (AKA mspec).
Since it does not affect IA64 machines you have, this patch should be very safe, yet needed for Altix.
Quoted 8 lines
I strongly suspect that this is not a problem, but I wanted to bring it to your attention anyway. I can provide more detailed EFI information from any or all of these machines if you need it.
With regards to the kexec-tools portion of this patch, it looks fine to me and I don't think there will be any problem in merging it if/when the kernel portion is accepted.
Sounds great. Thanks for checking at your IA64 machines for me, Simon.
Regards,
jay
Quoted 1 line
Simon Horman
Acked-byQuoted 47 lines · Jay Lan
Quoted 13 lines · Simon Horman
Quoted 12 lines · Jay Lan
Currently a memory segment in memory map with attribute of
EFI_MEMORY_UCis denoted as "System RAM" in/proc/iomem, while memory of attribute (EFI_MEMORY_WB|EFI_MEMORY_UC) is also labeled the same.The kexec utility then includes uncached memory as part of vmcore. The kdump kernel MCA'ed when it tries to save the vmcore to a disk. A normal "cached" access may cause MCAs.
This patch would label memory with attribute of
EFI_MEMORY_UConly as "Uncached RAM" so that kexec would know not to include it in the vmcore. I will submit a separate kexec-tools patch to the kexec list.Quoted 8 lines
Quoted 1 line
Signed-off-by Jay Lan <[email protected]>Hi Jay,
I've taken a look on an RX2620, Tiger2 and Tiger4 and none of these machines have EFI memory regions that are covered by this new check. That is, any regions with the
EFI_MEMORY_UCbit set in the attribute either also have other attibute bits set, or are of a type not covered by this.Great! So the change affects most likely only SGI Altix machines. Below is the EFI memory regions of one node of an Altix machine:
PAL_code0000000001000000-0000000001FFFFFF 0000000000001000
8000000000000009
MemMapIO 00000000FF000000-00000000FFFFFFFF 0000000000001000
8000000000000001
Unusable 0000006000000000-000000600000FFFF 0000000000000010
0000000000000009RT_data0000006000010000-00000060000FFFFF 00000000000000F0
8000000000001001BS_data0000006000100000-00000060003FFFFF 0000000000000300
0000000000000001RT_data0000006000400000-0000006001FFFFFF 0000000000001C00
8000000000001009RT_data0000006002000000-0000006002FFFFFF 0000000000001000
8000000000000009BS_data0000006003000000-0000006033DFFFFF 0000000000030E00
0000000000000009
available 0000006033E00000-00000060F7FFFFFF 00000000000C4200 0000000000000009
MemMapIO 0000008000000000-0000009FFFFFFFFF 0000000002000000
8000000000000003
Quoted 5 lines
The first
BS_dataregion starting at0x0000006000100000is the case. That memory is part of Altix "fetchop" space (AKA mspec).Since it does not affect IA64 machines you have, this patch should be very safe, yet needed for Altix.
Thats what I was hoping your reaction would be.
Signature · 3 lines
Simon Horman VA Linux Systems Japan K.K., Sydney, Australia Satellite Office H: www.vergenet.net/~horms/ W: www.valinux.co.jp/en