[PATCH] Link breaks for large NR_CPUS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ext2 & ext3 lists,

Attatched is a patch that allows ext2 and ext3 to link correctly when
the kernel is configured with a large NR_CPUS.  We do have an immediate
need for this patch.

Any opinions on this?  The per-cpu lists are causing the kmalloc to fail
due to allocating more than the max.

thanks
mh

-- 
Martin Hicks                Wild Open Source Inc.
mort@xxxxxxxxxxxxxxxxxx     613-266-2296



# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.1356  -> 1.1357 
#	     fs/ext2/super.c	1.55    -> 1.56   
#	     fs/ext3/super.c	1.79    -> 1.80   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/11/04	mort@xxxxxxxxxxxxxx	1.1357
# Fix over-sized kmalloc() calls in ext[23]_get_super() when there are
# large numbers of processors.  This is due to the per-processor
# variables in the ext[23] superblock structure.  Replace kmalloc() with
# vmalloc()
# --------------------------------------------
#
diff -Nru a/fs/ext2/super.c b/fs/ext2/super.c
--- a/fs/ext2/super.c	Tue Nov  4 07:19:37 2003
+++ b/fs/ext2/super.c	Tue Nov  4 07:19:37 2003
@@ -20,6 +20,7 @@
 #include <linux/module.h>
 #include <linux/string.h>
 #include <linux/slab.h>
+#include <linux/vmalloc.h>
 #include <linux/init.h>
 #include <linux/blkdev.h>
 #include <linux/parser.h>
@@ -145,7 +146,7 @@
 	kfree(sbi->s_debts);
 	brelse (sbi->s_sbh);
 	sb->s_fs_info = NULL;
-	kfree(sbi);
+	vfree(sbi);
 
 	return;
 }
@@ -571,7 +572,7 @@
 	int db_count;
 	int i, j;
 
-	sbi = kmalloc(sizeof(*sbi), GFP_KERNEL);
+	sbi = vmalloc(sizeof(*sbi));
 	if (!sbi)
 		return -ENOMEM;
 	sb->s_fs_info = sbi;
diff -Nru a/fs/ext3/super.c b/fs/ext3/super.c
--- a/fs/ext3/super.c	Tue Nov  4 07:19:37 2003
+++ b/fs/ext3/super.c	Tue Nov  4 07:19:37 2003
@@ -25,6 +25,7 @@
 #include <linux/ext3_fs.h>
 #include <linux/ext3_jbd.h>
 #include <linux/slab.h>
+#include <linux/vmalloc.h>
 #include <linux/init.h>
 #include <linux/blkdev.h>
 #include <linux/parser.h>
@@ -421,7 +422,7 @@
 		ext3_blkdev_remove(sbi);
 	}
 	sb->s_fs_info = NULL;
-	kfree(sbi);
+	vfree(sbi);
 	return;
 }
 
@@ -1044,7 +1045,7 @@
 	int i;
 	int needs_recovery;
 
-	sbi = kmalloc(sizeof(*sbi), GFP_KERNEL);
+	sbi = vmalloc(sizeof(*sbi));
 	if (!sbi)
 		return -ENOMEM;
 	sb->s_fs_info = sbi;



_______________________________________________

Ext3-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/ext3-users

[Index of Archives]         [Linux RAID]     [Kernel Development]     [Red Hat Install]     [Video 4 Linux]     [Postgresql]     [Fedora]     [Gimp]     [Yosemite News]

  Powered by Linux