summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2002-09-04 18:45:49 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2002-09-04 18:45:49 -0700
commitacdc721fe26d7474802ff695b33c7882948afab6 (patch)
tree26f91696f952b74e03fbfe40e28f1702d116d809 /include/linux
parentccfe3b2085e5764e1839e3984eef9cdb358bd746 (diff)
[PATCH] pid-max-2.5.33-A0
This is the pid-max patch, the one i sent for 2.5.31 was botched. I have removed the 'once' debugging stupidity - now PIDs start at 0 again. Also, for an unknown reason the previous patch missed the hunk that had the declaration of 'DEFAULT_PID_MAX' which made it not compile ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/sched.h2
-rw-r--r--include/linux/sysctl.h1
-rw-r--r--include/linux/threads.h3
3 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index c5c828d52897..896b7f59941c 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -455,7 +455,7 @@ extern struct task_struct init_task;
extern struct mm_struct init_mm;
/* PID hashing. (shouldnt this be dynamic?) */
-#define PIDHASH_SZ (4096 >> 2)
+#define PIDHASH_SZ 8192
extern struct task_struct *pidhash[PIDHASH_SZ];
#define pid_hashfn(x) ((((x) >> 8) ^ (x)) & (PIDHASH_SZ - 1))
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 4c598d745e2e..4856854660cc 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -127,6 +127,7 @@ enum
KERN_CORE_USES_PID=52, /* int: use core or core.%pid */
KERN_TAINTED=53, /* int: various kernel tainted flags */
KERN_CADPID=54, /* int: PID of the process to notify on CAD */
+ KERN_PIDMAX=55, /* int: PID # limit */
};
diff --git a/include/linux/threads.h b/include/linux/threads.h
index 6804ee73640f..8e0ddb960524 100644
--- a/include/linux/threads.h
+++ b/include/linux/threads.h
@@ -19,7 +19,6 @@
/*
* This controls the maximum pid allocated to a process
*/
-#define PID_MASK 0x3fffffff
-#define PID_MAX (PID_MASK+1)
+#define DEFAULT_PID_MAX 0x8000
#endif