diff options
author | Tejun Heo <tj@kernel.org> | 2010-06-13 12:19:48 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2010-06-13 12:19:48 -0400 |
commit | 53c5f5ba42c194cb13dd3083ed425f2c5b1ec439 (patch) | |
tree | 72aea970204f3cbf8bd159a8936b36fc61b55718 /include | |
parent | 7e27d6e778cd87b6f2415515d7127eba53fe5d02 (diff) | |
parent | 21aa9af03d06cb1d19a3738e5cf12acff984e69b (diff) |
Merge branch 'sched-wq' of ../wq into cmwq-base
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/cpu.h | 25 | ||||
-rw-r--r-- | include/linux/cpuset.h | 6 | ||||
-rw-r--r-- | include/linux/perf_event.h | 2 | ||||
-rw-r--r-- | include/linux/sched.h | 1 |
4 files changed, 33 insertions, 1 deletions
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index e287863ac053..de6b1722cdca 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -48,6 +48,31 @@ extern ssize_t arch_cpu_release(const char *, size_t); | |||
48 | #endif | 48 | #endif |
49 | struct notifier_block; | 49 | struct notifier_block; |
50 | 50 | ||
51 | /* | ||
52 | * CPU notifier priorities. | ||
53 | */ | ||
54 | enum { | ||
55 | /* | ||
56 | * SCHED_ACTIVE marks a cpu which is coming up active during | ||
57 | * CPU_ONLINE and CPU_DOWN_FAILED and must be the first | ||
58 | * notifier. CPUSET_ACTIVE adjusts cpuset according to | ||
59 | * cpu_active mask right after SCHED_ACTIVE. During | ||
60 | * CPU_DOWN_PREPARE, SCHED_INACTIVE and CPUSET_INACTIVE are | ||
61 | * ordered in the similar way. | ||
62 | * | ||
63 | * This ordering guarantees consistent cpu_active mask and | ||
64 | * migration behavior to all cpu notifiers. | ||
65 | */ | ||
66 | CPU_PRI_SCHED_ACTIVE = INT_MAX, | ||
67 | CPU_PRI_CPUSET_ACTIVE = INT_MAX - 1, | ||
68 | CPU_PRI_SCHED_INACTIVE = INT_MIN + 1, | ||
69 | CPU_PRI_CPUSET_INACTIVE = INT_MIN, | ||
70 | |||
71 | /* migration should happen before other stuff but after perf */ | ||
72 | CPU_PRI_PERF = 20, | ||
73 | CPU_PRI_MIGRATION = 10, | ||
74 | }; | ||
75 | |||
51 | #ifdef CONFIG_SMP | 76 | #ifdef CONFIG_SMP |
52 | /* Need to know about CPUs going up/down? */ | 77 | /* Need to know about CPUs going up/down? */ |
53 | #if defined(CONFIG_HOTPLUG_CPU) || !defined(MODULE) | 78 | #if defined(CONFIG_HOTPLUG_CPU) || !defined(MODULE) |
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index 457ed765a116..f20eb8f16025 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
@@ -20,6 +20,7 @@ extern int number_of_cpusets; /* How many cpusets are defined in system? */ | |||
20 | 20 | ||
21 | extern int cpuset_init(void); | 21 | extern int cpuset_init(void); |
22 | extern void cpuset_init_smp(void); | 22 | extern void cpuset_init_smp(void); |
23 | extern void cpuset_update_active_cpus(void); | ||
23 | extern void cpuset_cpus_allowed(struct task_struct *p, struct cpumask *mask); | 24 | extern void cpuset_cpus_allowed(struct task_struct *p, struct cpumask *mask); |
24 | extern int cpuset_cpus_allowed_fallback(struct task_struct *p); | 25 | extern int cpuset_cpus_allowed_fallback(struct task_struct *p); |
25 | extern nodemask_t cpuset_mems_allowed(struct task_struct *p); | 26 | extern nodemask_t cpuset_mems_allowed(struct task_struct *p); |
@@ -132,6 +133,11 @@ static inline void set_mems_allowed(nodemask_t nodemask) | |||
132 | static inline int cpuset_init(void) { return 0; } | 133 | static inline int cpuset_init(void) { return 0; } |
133 | static inline void cpuset_init_smp(void) {} | 134 | static inline void cpuset_init_smp(void) {} |
134 | 135 | ||
136 | static inline void cpuset_update_active_cpus(void) | ||
137 | { | ||
138 | partition_sched_domains(1, NULL, NULL); | ||
139 | } | ||
140 | |||
135 | static inline void cpuset_cpus_allowed(struct task_struct *p, | 141 | static inline void cpuset_cpus_allowed(struct task_struct *p, |
136 | struct cpumask *mask) | 142 | struct cpumask *mask) |
137 | { | 143 | { |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 5d0266d94985..469e03e96fe7 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -1068,7 +1068,7 @@ static inline void perf_event_disable(struct perf_event *event) { } | |||
1068 | #define perf_cpu_notifier(fn) \ | 1068 | #define perf_cpu_notifier(fn) \ |
1069 | do { \ | 1069 | do { \ |
1070 | static struct notifier_block fn##_nb __cpuinitdata = \ | 1070 | static struct notifier_block fn##_nb __cpuinitdata = \ |
1071 | { .notifier_call = fn, .priority = 20 }; \ | 1071 | { .notifier_call = fn, .priority = CPU_PRI_PERF }; \ |
1072 | fn(&fn##_nb, (unsigned long)CPU_UP_PREPARE, \ | 1072 | fn(&fn##_nb, (unsigned long)CPU_UP_PREPARE, \ |
1073 | (void *)(unsigned long)smp_processor_id()); \ | 1073 | (void *)(unsigned long)smp_processor_id()); \ |
1074 | fn(&fn##_nb, (unsigned long)CPU_STARTING, \ | 1074 | fn(&fn##_nb, (unsigned long)CPU_STARTING, \ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index f118809c953f..edc3dd168d87 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1696,6 +1696,7 @@ extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t * | |||
1696 | #define PF_EXITING 0x00000004 /* getting shut down */ | 1696 | #define PF_EXITING 0x00000004 /* getting shut down */ |
1697 | #define PF_EXITPIDONE 0x00000008 /* pi exit done on shut down */ | 1697 | #define PF_EXITPIDONE 0x00000008 /* pi exit done on shut down */ |
1698 | #define PF_VCPU 0x00000010 /* I'm a virtual CPU */ | 1698 | #define PF_VCPU 0x00000010 /* I'm a virtual CPU */ |
1699 | #define PF_WQ_WORKER 0x00000020 /* I'm a workqueue worker */ | ||
1699 | #define PF_FORKNOEXEC 0x00000040 /* forked but didn't exec */ | 1700 | #define PF_FORKNOEXEC 0x00000040 /* forked but didn't exec */ |
1700 | #define PF_MCE_PROCESS 0x00000080 /* process policy on mce errors */ | 1701 | #define PF_MCE_PROCESS 0x00000080 /* process policy on mce errors */ |
1701 | #define PF_SUPERPRIV 0x00000100 /* used super-user privileges */ | 1702 | #define PF_SUPERPRIV 0x00000100 /* used super-user privileges */ |