rpms/kernel/F-7 linux-2.6-gfs-locking-exports.patch, NONE, 1.1 linux-2.6-x86_64-e820_hole_size.patch, NONE, 1.1 kernel-2.6.spec, 1.3319, 1.3320
Chuck Ebbert (cebbert)
fedora-extras-commits at redhat.com
Thu Aug 16 15:15:39 UTC 2007
- Previous message (by thread): rpms/libxml++/devel libxml++.spec,1.17,1.18
- Next message (by thread): rpms/kernel/F-7/configs config-debug, 1.10, 1.11 config-ia64-generic, 1.53, 1.54 config-nodebug, 1.11, 1.12 config-x86-generic, 1.90, 1.91 config-x86_64-generic, 1.71, 1.72
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: cebbert
Update of /cvs/pkgs/rpms/kernel/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17484
Modified Files:
kernel-2.6.spec
Added Files:
linux-2.6-gfs-locking-exports.patch
linux-2.6-x86_64-e820_hole_size.patch
Log Message:
* Thu Aug 16 2007 Chuck Ebbert <cebbert at redhat.com>
- enable ACPI_DEBUG in -debug builds
- fix e820 memory hole sizing on x86_64
- export GFS2 symbols for lock modules
linux-2.6-gfs-locking-exports.patch:
--- NEW FILE linux-2.6-gfs-locking-exports.patch ---
Please add the following patch to the Fedora kernel (F-7, FC-6 & devel).
This was originally in the FC-6 kernel but seems to have vanished. This
patch isn't going to get sent upstream for various reasons but we need
it in Fedora so that the GFS kernel stuff will build against the GFS2
lock modules.
Steve.
-----------------------------------------------------------------------------
--- linux-2.6.17.noarch/fs/gfs2/locking.c~ 2006-08-10 13:33:09.000000000 -0400
+++ linux-2.6.17.noarch/fs/gfs2/locking.c 2006-08-10 13:33:23.000000000 -0400
@@ -188,4 +188,6 @@ void __init gfs2_init_lmh(void)
EXPORT_SYMBOL_GPL(gfs2_register_lockproto);
EXPORT_SYMBOL_GPL(gfs2_unregister_lockproto);
-
+EXPORT_SYMBOL_GPL(gfs2_withdraw_lockproto);
+EXPORT_SYMBOL_GPL(gfs2_mount_lockproto);
+EXPORT_SYMBOL_GPL(gfs2_unmount_lockproto);
linux-2.6-x86_64-e820_hole_size.patch:
--- NEW FILE linux-2.6-x86_64-e820_hole_size.patch ---
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3af044e0f832cfa3fcdce14dc30678b79dd36995
Commit: 3af044e0f832cfa3fcdce14dc30678b79dd36995
Parent: 34feb2c83beb3bdf13535a36770f7e50b47ef299
Author: David Rientjes <rientjes at google.com>
AuthorDate: Sat Jul 21 17:10:31 2007 +0200
Committer: Linus Torvalds <torvalds at woody.linux-foundation.org>
CommitDate: Sat Jul 21 18:37:10 2007 -0700
x86_64: extract helper function from e820_register_active_regions
The logic in e820_find_active_regions() for determining the true active
regions for an e820 entry given a range of PFN's is needed for
e820_hole_size() as well.
e820_hole_size() is called from the NUMA emulation code to determine the
reserved area within an address range on a per-node basis. Its logic should
duplicate that of finding active regions in an e820 entry because these are
the only true ranges we may register anyway.
[akpm at linux-foundation.org: cleanup]
Cc: Mel Gorman <mel at csn.ul.ie>
Signed-off-by: David Rientjes <rientjes at google.com>
Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
Signed-off-by: Andi Kleen <ak at suse.de>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
---
arch/x86_64/kernel/e820.c | 82 ++++++++++++++++++++++++++------------------
1 files changed, 48 insertions(+), 34 deletions(-)
diff --git a/arch/x86_64/kernel/e820.c b/arch/x86_64/kernel/e820.c
index 13c6c37..2570643 100644
--- a/arch/x86_64/kernel/e820.c
+++ b/arch/x86_64/kernel/e820.c
@@ -289,47 +289,61 @@ void __init e820_mark_nosave_regions(void)
}
}
-/* Walk the e820 map and register active regions within a node */
-void __init
-e820_register_active_regions(int nid, unsigned long start_pfn,
- unsigned long end_pfn)
+/*
+ * Finds an active region in the address range from start_pfn to end_pfn and
+ * returns its range in ei_startpfn and ei_endpfn for the e820 entry.
+ */
+static int __init e820_find_active_region(const struct e820entry *ei,
+ unsigned long start_pfn,
+ unsigned long end_pfn,
+ unsigned long *ei_startpfn,
+ unsigned long *ei_endpfn)
{
- int i;
- unsigned long ei_startpfn, ei_endpfn;
- for (i = 0; i < e820.nr_map; i++) {
- struct e820entry *ei = &e820.map[i];
- ei_startpfn = round_up(ei->addr, PAGE_SIZE) >> PAGE_SHIFT;
- ei_endpfn = round_down(ei->addr + ei->size, PAGE_SIZE)
- >> PAGE_SHIFT;
+ *ei_startpfn = round_up(ei->addr, PAGE_SIZE) >> PAGE_SHIFT;
+ *ei_endpfn = round_down(ei->addr + ei->size, PAGE_SIZE) >> PAGE_SHIFT;
- /* Skip map entries smaller than a page */
- if (ei_startpfn >= ei_endpfn)
- continue;
+ /* Skip map entries smaller than a page */
+ if (*ei_startpfn >= *ei_endpfn)
+ return 0;
- /* Check if end_pfn_map should be updated */
- if (ei->type != E820_RAM && ei_endpfn > end_pfn_map)
- end_pfn_map = ei_endpfn;
+ /* Check if end_pfn_map should be updated */
+ if (ei->type != E820_RAM && *ei_endpfn > end_pfn_map)
+ end_pfn_map = *ei_endpfn;
- /* Skip if map is outside the node */
- if (ei->type != E820_RAM ||
- ei_endpfn <= start_pfn ||
- ei_startpfn >= end_pfn)
- continue;
+ /* Skip if map is outside the node */
+ if (ei->type != E820_RAM || *ei_endpfn <= start_pfn ||
+ *ei_startpfn >= end_pfn)
+ return 0;
- /* Check for overlaps */
- if (ei_startpfn < start_pfn)
- ei_startpfn = start_pfn;
- if (ei_endpfn > end_pfn)
- ei_endpfn = end_pfn;
+ /* Check for overlaps */
+ if (*ei_startpfn < start_pfn)
+ *ei_startpfn = start_pfn;
+ if (*ei_endpfn > end_pfn)
+ *ei_endpfn = end_pfn;
- /* Obey end_user_pfn to save on memmap */
- if (ei_startpfn >= end_user_pfn)
- continue;
- if (ei_endpfn > end_user_pfn)
- ei_endpfn = end_user_pfn;
+ /* Obey end_user_pfn to save on memmap */
+ if (*ei_startpfn >= end_user_pfn)
+ return 0;
+ if (*ei_endpfn > end_user_pfn)
+ *ei_endpfn = end_user_pfn;
- add_active_range(nid, ei_startpfn, ei_endpfn);
- }
+ return 1;
+}
+
+/* Walk the e820 map and register active regions within a node */
+void __init
+e820_register_active_regions(int nid, unsigned long start_pfn,
+ unsigned long end_pfn)
+{
+ unsigned long ei_startpfn;
+ unsigned long ei_endpfn;
+ int i;
+
+ for (i = 0; i < e820.nr_map; i++)
+ if (e820_find_active_region(&e820.map[i],
+ start_pfn, end_pfn,
+ &ei_startpfn, &ei_endpfn))
+ add_active_range(nid, ei_startpfn, ei_endpfn);
}
/*
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a7e96629efcab1ccea3a376f3f5683c8d9e882c1
Commit: a7e96629efcab1ccea3a376f3f5683c8d9e882c1
Parent: bc2cea6a34fdb30f118ec75db39a46a191870607
Author: David Rientjes <rientjes at google.com>
AuthorDate: Sat Jul 21 17:11:29 2007 +0200
Committer: Linus Torvalds <torvalds at woody.linux-foundation.org>
CommitDate: Sat Jul 21 18:37:14 2007 -0700
x86_64: fix e820_hole_size based on address ranges
e820_hole_size() now uses the newly extracted helper function,
e820_find_active_region(), to determine the size of usable RAM in a range of
PFN's.
This was previously broken because of two reasons:
- The start and end PFN's of each e820 entry were not properly rounded
prior to excluding those entries in the range, and
- Entries smaller than a page were not properly excluded from being
accumulated.
This resulted in emulated nodes being incorrectly mapped to ranges that
were completely reserved and not candidates for being registered as
active ranges.
Signed-off-by: David Rientjes <rientjes at google.com>
Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
Signed-off-by: Andi Kleen <ak at suse.de>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
---
arch/x86_64/kernel/e820.c | 54 +++++++++++++++++++-------------------------
arch/x86_64/mm/numa.c | 8 +-----
2 files changed, 25 insertions(+), 37 deletions(-)
diff --git a/arch/x86_64/kernel/e820.c b/arch/x86_64/kernel/e820.c
index 2570643..62e051b 100644
--- a/arch/x86_64/kernel/e820.c
+++ b/arch/x86_64/kernel/e820.c
@@ -194,37 +194,6 @@ unsigned long __init e820_end_of_ram(void)
}
/*
- * Find the hole size in the range.
- */
-unsigned long __init e820_hole_size(unsigned long start, unsigned long end)
-{
- unsigned long ram = 0;
- int i;
-
- for (i = 0; i < e820.nr_map; i++) {
- struct e820entry *ei = &e820.map[i];
- unsigned long last, addr;
-
- if (ei->type != E820_RAM ||
- ei->addr+ei->size <= start ||
- ei->addr >= end)
- continue;
-
- addr = round_up(ei->addr, PAGE_SIZE);
- if (addr < start)
- addr = start;
-
- last = round_down(ei->addr + ei->size, PAGE_SIZE);
- if (last >= end)
- last = end;
-
- if (last > addr)
- ram += last - addr;
- }
- return ((end - start) - ram);
-}
-
-/*
* Mark e820 reserved areas as busy for the resource manager.
*/
void __init e820_reserve_resources(void)
@@ -364,6 +333,29 @@ void __init add_memory_region(unsigned long start, unsigned long size, int type)
e820.nr_map++;
}
+/*
+ * Find the hole size (in bytes) in the memory range.
+ * @start: starting address of the memory range to scan
+ * @end: ending address of the memory range to scan
+ */
+unsigned long __init e820_hole_size(unsigned long start, unsigned long end)
+{
+ unsigned long start_pfn = start >> PAGE_SHIFT;
+ unsigned long end_pfn = end >> PAGE_SHIFT;
+ unsigned long ei_startpfn;
+ unsigned long ei_endpfn;
+ unsigned long ram = 0;
+ int i;
+
+ for (i = 0; i < e820.nr_map; i++) {
+ if (e820_find_active_region(&e820.map[i],
+ start_pfn, end_pfn,
+ &ei_startpfn, &ei_endpfn))
+ ram += ei_endpfn - ei_startpfn;
+ }
+ return end - start - (ram << PAGE_SHIFT);
+}
+
void __init e820_print_map(char *who)
{
int i;
diff --git a/arch/x86_64/mm/numa.c b/arch/x86_64/mm/numa.c
index 30bf804..0191b1c 100644
--- a/arch/x86_64/mm/numa.c
+++ b/arch/x86_64/mm/numa.c
@@ -273,9 +273,6 @@ void __init numa_init_array(void)
#ifdef CONFIG_NUMA_EMU
/* Numa emulation */
-#define E820_ADDR_HOLE_SIZE(start, end) \
- (e820_hole_size((start) >> PAGE_SHIFT, (end) >> PAGE_SHIFT) << \
- PAGE_SHIFT)
char *cmdline __initdata;
/*
@@ -319,7 +316,7 @@ static int __init split_nodes_equally(struct bootnode *nodes, u64 *addr,
return -1;
if (num_nodes > MAX_NUMNODES)
num_nodes = MAX_NUMNODES;
- size = (max_addr - *addr - E820_ADDR_HOLE_SIZE(*addr, max_addr)) /
+ size = (max_addr - *addr - e820_hole_size(*addr, max_addr)) /
num_nodes;
/*
* Calculate the number of big nodes that can be allocated as a result
@@ -347,7 +344,7 @@ static int __init split_nodes_equally(struct bootnode *nodes, u64 *addr,
if (i == num_nodes + node_start - 1)
end = max_addr;
else
- while (end - *addr - E820_ADDR_HOLE_SIZE(*addr, end) <
+ while (end - *addr - e820_hole_size(*addr, end) <
size) {
end += FAKE_NODE_MIN_SIZE;
if (end > max_addr) {
@@ -488,7 +485,6 @@ out:
numa_init_array();
return 0;
}
-#undef E820_ADDR_HOLE_SIZE
#endif /* CONFIG_NUMA_EMU */
void __init numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn)
Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/kernel-2.6.spec,v
retrieving revision 1.3319
retrieving revision 1.3320
diff -u -r1.3319 -r1.3320
--- kernel-2.6.spec 15 Aug 2007 20:37:36 -0000 1.3319
+++ kernel-2.6.spec 16 Aug 2007 15:15:07 -0000 1.3320
@@ -565,6 +565,7 @@
Patch401: linux-2.6-aacraid-ioctl-security.patch
Patch420: linux-2.6-squashfs.patch
Patch422: linux-2.6-gfs2-update.patch
+Patch423: linux-2.6-gfs-locking-exports.patch
Patch430: linux-2.6-net-silence-noisy-printks.patch
Patch434: linux-2.6-add_xt_statistic.h_to_hdrs.patch
Patch440: linux-2.6-sha_alignment.patch
@@ -577,6 +578,7 @@
Patch590: linux-2.6-unexport-symbols.patch
Patch600: linux-2.6-vm-silence-atomic-alloc-failures.patch
Patch601: linux-2.6-input-ff-create-limit-memory.patch
+Patch602: linux-2.6-x86_64-e820_hole_size.patch
Patch610: linux-2.6-defaults-fat-utf8.patch
Patch620: linux-2.6-defaults-unicode-vt.patch
Patch630: linux-2.6-defaults-nonmi.patch
@@ -1221,6 +1223,8 @@
ApplyPatch linux-2.6-squashfs.patch
# gfs2 update to latest
ApplyPatch linux-2.6-gfs2-update.patch
+# export symbols for gfs2 locking modules
+ApplyPatch linux-2.6-gfs-locking-exports.patch
# Networking
# Disable easy to trigger printk's.
@@ -1253,6 +1257,8 @@
ApplyPatch linux-2.6-vm-silence-atomic-alloc-failures.patch
# don't let input FF drivers allocate too much memory
ApplyPatch linux-2.6-input-ff-create-limit-memory.patch
+# fix sizing of memory holes on x86_64
+ApplyPatch linux-2.6-x86_64-e820_hole_size.patch
# Changes to upstream defaults.
# Use UTF-8 by default on VFAT.
@@ -2275,6 +2281,11 @@
%endif
%changelog
+* Thu Aug 16 2007 Chuck Ebbert <cebbert at redhat.com>
+- enable ACPI_DEBUG in -debug builds
+- fix e820 memory hole sizing on x86_64
+- export GFS2 symbols for lock modules
+
* Wed Aug 15 2007 Chuck Ebbert <cebbert at redhat.com>
- Linux 2.6.22.3
- Previous message (by thread): rpms/libxml++/devel libxml++.spec,1.17,1.18
- Next message (by thread): rpms/kernel/F-7/configs config-debug, 1.10, 1.11 config-ia64-generic, 1.53, 1.54 config-nodebug, 1.11, 1.12 config-x86-generic, 1.90, 1.91 config-x86_64-generic, 1.71, 1.72
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list