[PATCH 4/8] core-small: Shrink PID lookup tables

From: Matt Mackall
Date: Fri Jan 21 2005 - 19:56:27 EST


CONFIG_CORE_SMALL reduce size of pidmap table for small machines

Signed-off-by: Matt Mackall <mpm@xxxxxxxxxxx>

Index: tiny/include/linux/threads.h
===================================================================
--- tiny.orig/include/linux/threads.h 2004-12-04 15:42:35.000000000 -0800
+++ tiny/include/linux/threads.h 2004-12-04 19:42:19.032212529 -0800
@@ -25,11 +25,19 @@
/*
* This controls the default maximum pid allocated to a process
*/
+#ifdef CONFIG_CORE_SMALL
+#define PID_MAX_DEFAULT 0x1000
+#else
#define PID_MAX_DEFAULT 0x8000
+#endif

/*
* A maximum of 4 million PIDs should be enough for a while:
*/
+#ifdef CONFIG_CORE_SMALL
+#define PID_MAX_LIMIT (PAGE_SIZE*8) /* one pidmap entry */
+#else
#define PID_MAX_LIMIT (sizeof(long) > 4 ? 4*1024*1024 : PID_MAX_DEFAULT)
+#endif

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