summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-05-22 08:04:51 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-05-22 08:04:51 -0700
commite52c02f76ae684f86f18f0fc7d7577e22a4d9318 (patch)
tree0943aa14e6adce0f4d479a6e158700714f8b9114 /include
parentd31d7a1874c710a5c1b589807d53f32d8e7df397 (diff)
[PATCH] small numa api fixups
From: Christoph Hellwig <hch@lst.de> - don't include mempolicy.h in sched.h and mm.h when a forward delcaration is enough. Andi argued against that in the past, but I'd really hate to add another header to two of the includes used in basically every driver when we can include it in the six files actually needing it instead (that number is for my ppc32 system, maybe other arches need more include in their directories) - make numa api fields in tast_struct conditional on CONFIG_NUMA, this gives us a few ugly ifdefs but avoids wasting memory on non-NUMA systems.
Diffstat (limited to 'include')
-rw-r--r--include/linux/mm.h3
-rw-r--r--include/linux/sched.h4
2 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 8dd58e11edb0..249167672b83 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -12,7 +12,8 @@
#include <linux/mmzone.h>
#include <linux/rbtree.h>
#include <linux/fs.h>
-#include <linux/mempolicy.h>
+
+struct mempolicy;
#ifndef CONFIG_DISCONTIGMEM /* Don't use mapnrs, do it properly */
extern unsigned long max_mapnr;
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 9a539b7eb0d2..9cf8e5be3ed0 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -29,7 +29,6 @@
#include <linux/completion.h>
#include <linux/pid.h>
#include <linux/percpu.h>
-#include <linux/mempolicy.h>
struct exec_domain;
@@ -381,6 +380,7 @@ int set_current_groups(struct group_info *group_info);
struct audit_context; /* See audit.c */
+struct mempolicy;
struct task_struct {
volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */
@@ -510,8 +510,10 @@ struct task_struct {
unsigned long ptrace_message;
siginfo_t *last_siginfo; /* For ptrace use. */
+#ifdef CONFIG_NUMA
struct mempolicy *mempolicy;
short il_next; /* could be shared with used_math */
+#endif
};
static inline pid_t process_group(struct task_struct *tsk)