From: Ravikiran G Thirumalai <kiran@scalex86.org>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, shai@scalex86.org
Subject: [patch] mm: Ensure proper alignment for node_remap_start_pfn
Date: Wed, 27 Jul 2005 17:42:41 -0700 [thread overview]
Message-ID: <20050728004241.GA16073@localhost.localdomain> (raw)
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.
WARNING: multiple messages have this Message-ID (diff)
From: Ravikiran G Thirumalai <kiran@scalex86.org>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, shai@scalex86.org
Subject: [patch] mm: Ensure proper alignment for node_remap_start_pfn
Date: Wed, 27 Jul 2005 17:42:41 -0700 [thread overview]
Message-ID: <20050728004241.GA16073@localhost.localdomain> (raw)
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>
next reply other threads:[~2005-07-28 0:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-28 0:42 Ravikiran G Thirumalai [this message]
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:17 ` Andrew Morton
2005-07-28 1:31 ` Ravikiran G Thirumalai
2005-07-28 1:31 ` Ravikiran G Thirumalai
2005-07-28 17:20 ` Dave Hansen
2005-07-28 17:20 ` Dave Hansen
2005-07-28 18:14 ` Ravikiran G Thirumalai
2005-07-28 18:14 ` Ravikiran G Thirumalai
2005-07-28 18:25 ` Dave Hansen
2005-07-28 18:25 ` Dave Hansen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050728004241.GA16073@localhost.localdomain \
--to=kiran@scalex86.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shai@scalex86.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.