* [patch] mm: Ensure proper alignment for node_remap_start_pfn
@ 2005-07-28 0:42 Ravikiran G Thirumalai
2005-07-28 1:17 ` Andrew Morton
0 siblings, 1 reply; 6+ messages in thread
From: Ravikiran G Thirumalai @ 2005-07-28 0:42 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, linux-mm, shai
While reserving KVA for lmem_maps of node, we have to make sure that
node_remap_start_pfn[] is aligned to a proper pmd boundary.
(node_remap_start_pfn[] gets its value from node_end_pfn[])
Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>
Signed-off-by: Shai Fultheim <shai@scalex86.org>
Index: linux-2.6.13-rc3/arch/i386/mm/discontig.c
===================================================================
--- linux-2.6.13-rc3.orig/arch/i386/mm/discontig.c 2005-07-26 15:10:25.000000000 -0700
+++ linux-2.6.13-rc3/arch/i386/mm/discontig.c 2005-07-26 16:27:43.000000000 -0700
@@ -243,6 +243,14 @@
/* now the roundup is correct, convert to PAGE_SIZE pages */
size = size * PTRS_PER_PTE;
+ if (node_end_pfn[nid] & (PTRS_PER_PTE-1)) {
+ /*
+ * Adjust size if node_end_pfn is not on a proper
+ * pmd boundary. remap_numa_kva will barf otherwise.
+ */
+ size += node_end_pfn[nid] & (PTRS_PER_PTE-1);
+ }
+
/*
* Validate the region we are allocating only contains valid
* pages.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch] mm: Ensure proper alignment for node_remap_start_pfn
2005-07-28 0:42 [patch] mm: Ensure proper alignment for node_remap_start_pfn Ravikiran G Thirumalai
@ 2005-07-28 1:17 ` Andrew Morton
2005-07-28 1:31 ` Ravikiran G Thirumalai
0 siblings, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2005-07-28 1:17 UTC (permalink / raw)
To: Ravikiran G Thirumalai; +Cc: linux-kernel, linux-mm, shai
Ravikiran G Thirumalai <kiran@scalex86.org> wrote:
>
> While reserving KVA for lmem_maps of node, we have to make sure that
> node_remap_start_pfn[] is aligned to a proper pmd boundary.
> (node_remap_start_pfn[] gets its value from node_end_pfn[])
>
What are the effects of not having this patch applied? Does someone's
computer crash, or what?
IOW: what problem is this fixing, precisely?
>
> Index: linux-2.6.13-rc3/arch/i386/mm/discontig.c
> ===================================================================
> --- linux-2.6.13-rc3.orig/arch/i386/mm/discontig.c 2005-07-26 15:10:25.000000000 -0700
> +++ linux-2.6.13-rc3/arch/i386/mm/discontig.c 2005-07-26 16:27:43.000000000 -0700
> @@ -243,6 +243,14 @@
> /* now the roundup is correct, convert to PAGE_SIZE pages */
> size = size * PTRS_PER_PTE;
>
> + if (node_end_pfn[nid] & (PTRS_PER_PTE-1)) {
> + /*
> + * Adjust size if node_end_pfn is not on a proper
> + * pmd boundary. remap_numa_kva will barf otherwise.
> + */
> + size += node_end_pfn[nid] & (PTRS_PER_PTE-1);
> + }
> +
> /*
> * Validate the region we are allocating only contains valid
> * pages.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch] mm: Ensure proper alignment for node_remap_start_pfn
2005-07-28 1:17 ` Andrew Morton
@ 2005-07-28 1:31 ` Ravikiran G Thirumalai
2005-07-28 17:20 ` Dave Hansen
0 siblings, 1 reply; 6+ messages in thread
From: Ravikiran G Thirumalai @ 2005-07-28 1:31 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, linux-mm, shai
On Wed, Jul 27, 2005 at 06:17:24PM -0700, Andrew Morton wrote:
> Ravikiran G Thirumalai <kiran@scalex86.org> wrote:
> >
> > While reserving KVA for lmem_maps of node, we have to make sure that
> > node_remap_start_pfn[] is aligned to a proper pmd boundary.
> > (node_remap_start_pfn[] gets its value from node_end_pfn[])
> >
>
> What are the effects of not having this patch applied? Does someone's
> computer crash, or what?
Yes, it does cause a crash.
Thanks,
Kiran
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch] mm: Ensure proper alignment for node_remap_start_pfn
2005-07-28 1:31 ` Ravikiran G Thirumalai
@ 2005-07-28 17:20 ` Dave Hansen
2005-07-28 18:14 ` Ravikiran G Thirumalai
0 siblings, 1 reply; 6+ messages in thread
From: Dave Hansen @ 2005-07-28 17:20 UTC (permalink / raw)
To: Ravikiran G Thirumalai
Cc: Andrew Morton, Linux Kernel Mailing List, linux-mm, shai
On Wed, 2005-07-27 at 18:31 -0700, Ravikiran G Thirumalai wrote:
> On Wed, Jul 27, 2005 at 06:17:24PM -0700, Andrew Morton wrote:
> > Ravikiran G Thirumalai <kiran@scalex86.org> wrote:
> > >
> > > While reserving KVA for lmem_maps of node, we have to make sure that
> > > node_remap_start_pfn[] is aligned to a proper pmd boundary.
> > > (node_remap_start_pfn[] gets its value from node_end_pfn[])
> > >
> >
> > What are the effects of not having this patch applied? Does someone's
> > computer crash, or what?
>
> Yes, it does cause a crash.
I don't know of any NUMA x86 sub-arches that have nodes which are
aligned on any less than 2MB. Is this an architecture that's supported
in the tree, today?
-- Dave
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch] mm: Ensure proper alignment for node_remap_start_pfn
2005-07-28 17:20 ` Dave Hansen
@ 2005-07-28 18:14 ` Ravikiran G Thirumalai
2005-07-28 18:25 ` Dave Hansen
0 siblings, 1 reply; 6+ messages in thread
From: Ravikiran G Thirumalai @ 2005-07-28 18:14 UTC (permalink / raw)
To: Dave Hansen; +Cc: Andrew Morton, Linux Kernel Mailing List, linux-mm, shai
On Thu, Jul 28, 2005 at 10:20:26AM -0700, Dave Hansen wrote:
> On Wed, 2005-07-27 at 18:31 -0700, Ravikiran G Thirumalai wrote:
> > On Wed, Jul 27, 2005 at 06:17:24PM -0700, Andrew Morton wrote:
> > > Ravikiran G Thirumalai <kiran@scalex86.org> wrote:
> > > >
> > Yes, it does cause a crash.
>
> I don't know of any NUMA x86 sub-arches that have nodes which are
> aligned on any less than 2MB. Is this an architecture that's supported
> in the tree, today?
SRAT need not guarantee any alignment at all in the memory affinity
structure (the address in 64-bit byte address). And yes, there are x86-numa
machines that run the latest kernel tree and face this problem.
Thanks,
Kiran
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch] mm: Ensure proper alignment for node_remap_start_pfn
2005-07-28 18:14 ` Ravikiran G Thirumalai
@ 2005-07-28 18:25 ` Dave Hansen
0 siblings, 0 replies; 6+ messages in thread
From: Dave Hansen @ 2005-07-28 18:25 UTC (permalink / raw)
To: Ravikiran G Thirumalai
Cc: Andrew Morton, Linux Kernel Mailing List, linux-mm, shai
On Thu, 2005-07-28 at 11:14 -0700, Ravikiran G Thirumalai wrote:
> SRAT need not guarantee any alignment at all in the memory affinity
> structure (the address in 64-bit byte address)
The Summit machines (the only x86 user of the SRAT) have other hardware
guarantees about alignment, so I guess that's why we've never
encountered it. Are you using the SRAT on non-Summit hardware? That
doesn't seem possible:
arch/i386/Kconfig:
config ACPI_SRAT
bool
default y
depends on NUMA && (X86_SUMMIT || X86_GENERICARCH)
> And yes, there are x86-numa
> machines that run the latest kernel tree and face this problem.
I didn't say "run the latest kernel tree". *In* the latest kernel
tree :)
-- Dave
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-07-28 18:25 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-28 0:42 [patch] mm: Ensure proper alignment for node_remap_start_pfn Ravikiran G Thirumalai
2005-07-28 1:17 ` Andrew Morton
2005-07-28 1:31 ` Ravikiran G Thirumalai
2005-07-28 17:20 ` Dave Hansen
2005-07-28 18:14 ` Ravikiran G Thirumalai
2005-07-28 18:25 ` Dave Hansen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox