NR_TASKS as config option.

Daniel Kobras (daniel.kobras@student.uni-tuebingen.de)
Fri, 11 Jun 1999 00:03:01 +0200 (CEST)


Paeivaeae!

Having seen the 2Gig RAM option introduced in 2.3.6, I found it was time
to make NR_TASKS a config option as well. Due to lack of better suited
places (Kernel tuning?) I chose to put it into Kernel hacking. Obvious
patch follows. [Patch relative to 2.3.6 but applies to 2.2.9 as well with
a little fuzz.]

Terve,

Daniel.

-----[snip]-------

--- ./Documentation/Configure.help.orig Thu Jun 10 20:34:01 1999
+++ ./Documentation/Configure.help Thu Jun 10 20:43:58 1999
@@ -10013,6 +10013,13 @@
keys are documented in Documentation/sysrq.txt. Don't say Y unless
you really know what this hack does.

+Maximum number of tasks
+CONFIG_NR_TASKS
+ If you need to run a vast number of processes in parallel you might
+ want to increase this number. NOTE: You probably want to tune the
+ per user task limit as well (ulimit -u). The highest allowed value
+ is 4092 on ix86 (4090 with APM configured).
+
ISDN subsystem
CONFIG_ISDN
ISDN ("Integrated Services Digital Networks", called RNIS in France)
--- ./arch/i386/config.in.orig Thu Jun 10 20:31:01 1999
+++ ./arch/i386/config.in Thu Jun 10 20:44:57 1999
@@ -205,5 +205,6 @@

#bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC
bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ
+int 'Maximum number of tasks' CONFIG_NR_TASKS 512
endmenu

--- ./arch/alpha/config.in.orig Thu Jun 10 20:46:37 1999
+++ ./arch/alpha/config.in Thu Jun 10 20:47:17 1999
@@ -280,4 +280,5 @@
fi

bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ
+int 'Maximum number of tasks' CONFIG_NR_TASKS 512
endmenu
--- ./arch/sparc/config.in.orig Thu Jun 10 20:49:15 1999
+++ ./arch/sparc/config.in Thu Jun 10 20:49:31 1999
@@ -198,5 +198,6 @@
comment 'Kernel hacking'

bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ
+int 'Maximum number of tasks' CONFIG_NR_TASKS 512
endmenu

--- ./arch/mips/config.in.orig Thu Jun 10 20:48:27 1999
+++ ./arch/mips/config.in Thu Jun 10 20:48:40 1999
@@ -218,4 +218,5 @@
fi
bool 'Remote GDB kernel debugging' CONFIG_REMOTE_DEBUG
bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ
+int 'Maximum number of tasks' CONFIG_NR_TASKS 512
endmenu
--- ./arch/ppc/config.in.orig Thu Jun 10 20:48:52 1999
+++ ./arch/ppc/config.in Thu Jun 10 20:49:04 1999
@@ -193,6 +193,7 @@
comment 'Kernel hacking'

bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ
+int 'Maximum number of tasks' CONFIG_NR_TASKS 512
bool 'Include kgdb kernel debugger' CONFIG_KGDB
bool 'Include xmon kernel debugger' CONFIG_XMON
endmenu
--- ./arch/m68k/config.in.orig Thu Jun 10 20:47:58 1999
+++ ./arch/m68k/config.in Thu Jun 10 20:48:12 1999
@@ -451,5 +451,6 @@

#bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC
bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ
+int 'Maximum number of tasks' CONFIG_NR_TASKS 512
bool 'Remote debugging support' CONFIG_KGDB
endmenu
--- ./arch/sparc64/config.in.orig Thu Jun 10 20:49:42 1999
+++ ./arch/sparc64/config.in Thu Jun 10 20:49:54 1999
@@ -250,5 +250,6 @@
comment 'Kernel hacking'

bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ
+int 'Maximum number of tasks' CONFIG_NR_TASKS 512
#bool 'ECache flush trap support at ta 0x72' CONFIG_EC_FLUSH_TRAP
endmenu
--- ./arch/arm/config.in.orig Thu Jun 10 20:47:33 1999
+++ ./arch/arm/config.in Thu Jun 10 20:47:46 1999
@@ -217,4 +217,5 @@
bool 'Debug kernel errors' CONFIG_DEBUG_ERRORS
#bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC
bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ
+int 'Maximum number of tasks' CONFIG_NR_TASKS 512
endmenu
--- ./include/linux/tasks.h.orig Thu Jun 10 20:32:01 1999
+++ ./include/linux/tasks.h Thu Jun 10 20:32:51 1999
@@ -11,7 +11,7 @@
#define NR_CPUS 1
#endif

-#define NR_TASKS 512 /* On x86 Max 4092, or 4090 w/APM configured. */
+#define NR_TASKS CONFIG_NR_TASKS /* On x86 Max 4092, or 4090 w/APM configured. */

#define MAX_TASKS_PER_USER (NR_TASKS/2)
#define MIN_TASKS_LEFT_FOR_ROOT 4

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/