diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/completion.h | 1 | ||||
-rw-r--r-- | include/linux/fs.h | 21 | ||||
-rw-r--r-- | include/linux/hardirq.h | 4 | ||||
-rw-r--r-- | include/linux/hrtimer.h | 32 | ||||
-rw-r--r-- | include/linux/sched.h | 18 | ||||
-rw-r--r-- | include/linux/smp.h | 5 | ||||
-rw-r--r-- | include/linux/tick.h | 5 |
7 files changed, 74 insertions, 12 deletions
diff --git a/include/linux/completion.h b/include/linux/completion.h index 51494e6b554..9d727271c9f 100644 --- a/include/linux/completion.h +++ b/include/linux/completion.h | |||
@@ -90,6 +90,7 @@ extern bool completion_done(struct completion *x); | |||
90 | 90 | ||
91 | extern void complete(struct completion *); | 91 | extern void complete(struct completion *); |
92 | extern void complete_all(struct completion *); | 92 | extern void complete_all(struct completion *); |
93 | extern void complete_n(struct completion *, int n); | ||
93 | 94 | ||
94 | /** | 95 | /** |
95 | * INIT_COMPLETION - reinitialize a completion structure | 96 | * INIT_COMPLETION - reinitialize a completion structure |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 212ea7ba3f1..c83d3d59100 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -17,8 +17,8 @@ | |||
17 | * nr_file rlimit, so it's safe to set up a ridiculously high absolute | 17 | * nr_file rlimit, so it's safe to set up a ridiculously high absolute |
18 | * upper limit on files-per-process. | 18 | * upper limit on files-per-process. |
19 | * | 19 | * |
20 | * Some programs (notably those using select()) may have to be | 20 | * Some programs (notably those using select()) may have to be |
21 | * recompiled to take full advantage of the new limits.. | 21 | * recompiled to take full advantage of the new limits.. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | /* Fixed constants first: */ | 24 | /* Fixed constants first: */ |
@@ -172,7 +172,7 @@ struct inodes_stat_t { | |||
172 | #define SEL_EX 4 | 172 | #define SEL_EX 4 |
173 | 173 | ||
174 | /* public flags for file_system_type */ | 174 | /* public flags for file_system_type */ |
175 | #define FS_REQUIRES_DEV 1 | 175 | #define FS_REQUIRES_DEV 1 |
176 | #define FS_BINARY_MOUNTDATA 2 | 176 | #define FS_BINARY_MOUNTDATA 2 |
177 | #define FS_HAS_SUBTYPE 4 | 177 | #define FS_HAS_SUBTYPE 4 |
178 | #define FS_REVAL_DOT 16384 /* Check the paths ".", ".." for staleness */ | 178 | #define FS_REVAL_DOT 16384 /* Check the paths ".", ".." for staleness */ |
@@ -480,7 +480,7 @@ struct iattr { | |||
480 | */ | 480 | */ |
481 | #include <linux/quota.h> | 481 | #include <linux/quota.h> |
482 | 482 | ||
483 | /** | 483 | /** |
484 | * enum positive_aop_returns - aop return codes with specific semantics | 484 | * enum positive_aop_returns - aop return codes with specific semantics |
485 | * | 485 | * |
486 | * @AOP_WRITEPAGE_ACTIVATE: Informs the caller that page writeback has | 486 | * @AOP_WRITEPAGE_ACTIVATE: Informs the caller that page writeback has |
@@ -490,7 +490,7 @@ struct iattr { | |||
490 | * be a candidate for writeback again in the near | 490 | * be a candidate for writeback again in the near |
491 | * future. Other callers must be careful to unlock | 491 | * future. Other callers must be careful to unlock |
492 | * the page if they get this return. Returned by | 492 | * the page if they get this return. Returned by |
493 | * writepage(); | 493 | * writepage(); |
494 | * | 494 | * |
495 | * @AOP_TRUNCATED_PAGE: The AOP method that was handed a locked page has | 495 | * @AOP_TRUNCATED_PAGE: The AOP method that was handed a locked page has |
496 | * unlocked it and the page might have been truncated. | 496 | * unlocked it and the page might have been truncated. |
@@ -738,6 +738,7 @@ static inline int mapping_writably_mapped(struct address_space *mapping) | |||
738 | 738 | ||
739 | struct posix_acl; | 739 | struct posix_acl; |
740 | #define ACL_NOT_CACHED ((void *)(-1)) | 740 | #define ACL_NOT_CACHED ((void *)(-1)) |
741 | struct inode_obj_id_table; | ||
741 | 742 | ||
742 | struct inode { | 743 | struct inode { |
743 | /* RCU path lookup touches following: */ | 744 | /* RCU path lookup touches following: */ |
@@ -811,6 +812,8 @@ struct inode { | |||
811 | struct posix_acl *i_acl; | 812 | struct posix_acl *i_acl; |
812 | struct posix_acl *i_default_acl; | 813 | struct posix_acl *i_default_acl; |
813 | #endif | 814 | #endif |
815 | struct list_head i_obj_list; | ||
816 | struct mutex i_obj_mutex; | ||
814 | void *i_private; /* fs or device private pointer */ | 817 | void *i_private; /* fs or device private pointer */ |
815 | }; | 818 | }; |
816 | 819 | ||
@@ -1037,10 +1040,10 @@ static inline int file_check_writeable(struct file *filp) | |||
1037 | 1040 | ||
1038 | #define MAX_NON_LFS ((1UL<<31) - 1) | 1041 | #define MAX_NON_LFS ((1UL<<31) - 1) |
1039 | 1042 | ||
1040 | /* Page cache limit. The filesystems should put that into their s_maxbytes | 1043 | /* Page cache limit. The filesystems should put that into their s_maxbytes |
1041 | limits, otherwise bad things can happen in VM. */ | 1044 | limits, otherwise bad things can happen in VM. */ |
1042 | #if BITS_PER_LONG==32 | 1045 | #if BITS_PER_LONG==32 |
1043 | #define MAX_LFS_FILESIZE (((u64)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1) | 1046 | #define MAX_LFS_FILESIZE (((u64)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1) |
1044 | #elif BITS_PER_LONG==64 | 1047 | #elif BITS_PER_LONG==64 |
1045 | #define MAX_LFS_FILESIZE 0x7fffffffffffffffUL | 1048 | #define MAX_LFS_FILESIZE 0x7fffffffffffffffUL |
1046 | #endif | 1049 | #endif |
@@ -2241,7 +2244,7 @@ extern void free_write_pipe(struct file *); | |||
2241 | 2244 | ||
2242 | extern int kernel_read(struct file *, loff_t, char *, unsigned long); | 2245 | extern int kernel_read(struct file *, loff_t, char *, unsigned long); |
2243 | extern struct file * open_exec(const char *); | 2246 | extern struct file * open_exec(const char *); |
2244 | 2247 | ||
2245 | /* fs/dcache.c -- generic fs support functions */ | 2248 | /* fs/dcache.c -- generic fs support functions */ |
2246 | extern int is_subdir(struct dentry *, struct dentry *); | 2249 | extern int is_subdir(struct dentry *, struct dentry *); |
2247 | extern int path_is_under(struct path *, struct path *); | 2250 | extern int path_is_under(struct path *, struct path *); |
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index de48bdad279..fecfe27d1f0 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h | |||
@@ -6,6 +6,8 @@ | |||
6 | #include <linux/ftrace_irq.h> | 6 | #include <linux/ftrace_irq.h> |
7 | #include <asm/hardirq.h> | 7 | #include <asm/hardirq.h> |
8 | 8 | ||
9 | #include <litmus/trace_irq.h> | ||
10 | |||
9 | /* | 11 | /* |
10 | * We put the hardirq and softirq counter into the preemption | 12 | * We put the hardirq and softirq counter into the preemption |
11 | * counter. The bitmask has the following meaning: | 13 | * counter. The bitmask has the following meaning: |
@@ -192,6 +194,7 @@ extern void rcu_nmi_exit(void); | |||
192 | account_system_vtime(current); \ | 194 | account_system_vtime(current); \ |
193 | add_preempt_count(HARDIRQ_OFFSET); \ | 195 | add_preempt_count(HARDIRQ_OFFSET); \ |
194 | trace_hardirq_enter(); \ | 196 | trace_hardirq_enter(); \ |
197 | ft_irq_fired(); \ | ||
195 | } while (0) | 198 | } while (0) |
196 | 199 | ||
197 | /* | 200 | /* |
@@ -222,6 +225,7 @@ extern void irq_exit(void); | |||
222 | lockdep_off(); \ | 225 | lockdep_off(); \ |
223 | rcu_nmi_enter(); \ | 226 | rcu_nmi_enter(); \ |
224 | trace_hardirq_enter(); \ | 227 | trace_hardirq_enter(); \ |
228 | ft_irq_fired(); \ | ||
225 | } while (0) | 229 | } while (0) |
226 | 230 | ||
227 | #define nmi_exit() \ | 231 | #define nmi_exit() \ |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index cc07d2777bb..6eb8bc57e42 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -175,6 +175,7 @@ enum hrtimer_base_type { | |||
175 | * @nr_hangs: Total number of hrtimer interrupt hangs | 175 | * @nr_hangs: Total number of hrtimer interrupt hangs |
176 | * @max_hang_time: Maximum time spent in hrtimer_interrupt | 176 | * @max_hang_time: Maximum time spent in hrtimer_interrupt |
177 | * @clock_base: array of clock bases for this cpu | 177 | * @clock_base: array of clock bases for this cpu |
178 | * @to_pull: LITMUS^RT list of timers to be pulled on this cpu | ||
178 | */ | 179 | */ |
179 | struct hrtimer_cpu_base { | 180 | struct hrtimer_cpu_base { |
180 | raw_spinlock_t lock; | 181 | raw_spinlock_t lock; |
@@ -190,8 +191,32 @@ struct hrtimer_cpu_base { | |||
190 | ktime_t max_hang_time; | 191 | ktime_t max_hang_time; |
191 | #endif | 192 | #endif |
192 | struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES]; | 193 | struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES]; |
194 | struct list_head to_pull; | ||
193 | }; | 195 | }; |
194 | 196 | ||
197 | #ifdef CONFIG_ARCH_HAS_SEND_PULL_TIMERS | ||
198 | |||
199 | #define HRTIMER_START_ON_INACTIVE 0 | ||
200 | #define HRTIMER_START_ON_QUEUED 1 | ||
201 | |||
202 | /* | ||
203 | * struct hrtimer_start_on_info - save timer info on remote cpu | ||
204 | * @list: list of hrtimer_start_on_info on remote cpu (to_pull) | ||
205 | * @timer: timer to be triggered on remote cpu | ||
206 | * @time: time event | ||
207 | * @mode: timer mode | ||
208 | * @state: activity flag | ||
209 | */ | ||
210 | struct hrtimer_start_on_info { | ||
211 | struct list_head list; | ||
212 | struct hrtimer *timer; | ||
213 | ktime_t time; | ||
214 | enum hrtimer_mode mode; | ||
215 | atomic_t state; | ||
216 | }; | ||
217 | |||
218 | #endif | ||
219 | |||
195 | static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time) | 220 | static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time) |
196 | { | 221 | { |
197 | timer->node.expires = time; | 222 | timer->node.expires = time; |
@@ -363,6 +388,13 @@ __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim, | |||
363 | unsigned long delta_ns, | 388 | unsigned long delta_ns, |
364 | const enum hrtimer_mode mode, int wakeup); | 389 | const enum hrtimer_mode mode, int wakeup); |
365 | 390 | ||
391 | #ifdef CONFIG_ARCH_HAS_SEND_PULL_TIMERS | ||
392 | extern void hrtimer_start_on_info_init(struct hrtimer_start_on_info *info); | ||
393 | extern int hrtimer_start_on(int cpu, struct hrtimer_start_on_info *info, | ||
394 | struct hrtimer *timer, ktime_t time, | ||
395 | const enum hrtimer_mode mode); | ||
396 | #endif | ||
397 | |||
366 | extern int hrtimer_cancel(struct hrtimer *timer); | 398 | extern int hrtimer_cancel(struct hrtimer *timer); |
367 | extern int hrtimer_try_to_cancel(struct hrtimer *timer); | 399 | extern int hrtimer_try_to_cancel(struct hrtimer *timer); |
368 | 400 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 1c44f22adae..a59c93266bc 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -39,6 +39,7 @@ | |||
39 | #define SCHED_BATCH 3 | 39 | #define SCHED_BATCH 3 |
40 | /* SCHED_ISO: reserved but not implemented yet */ | 40 | /* SCHED_ISO: reserved but not implemented yet */ |
41 | #define SCHED_IDLE 5 | 41 | #define SCHED_IDLE 5 |
42 | #define SCHED_LITMUS 6 | ||
42 | /* Can be ORed in to make sure the process is reverted back to SCHED_NORMAL on fork */ | 43 | /* Can be ORed in to make sure the process is reverted back to SCHED_NORMAL on fork */ |
43 | #define SCHED_RESET_ON_FORK 0x40000000 | 44 | #define SCHED_RESET_ON_FORK 0x40000000 |
44 | 45 | ||
@@ -93,6 +94,9 @@ struct sched_param { | |||
93 | 94 | ||
94 | #include <asm/processor.h> | 95 | #include <asm/processor.h> |
95 | 96 | ||
97 | #include <litmus/rt_param.h> | ||
98 | #include <litmus/preempt.h> | ||
99 | |||
96 | struct exec_domain; | 100 | struct exec_domain; |
97 | struct futex_pi_state; | 101 | struct futex_pi_state; |
98 | struct robust_list_head; | 102 | struct robust_list_head; |
@@ -1210,6 +1214,7 @@ struct sched_rt_entity { | |||
1210 | }; | 1214 | }; |
1211 | 1215 | ||
1212 | struct rcu_node; | 1216 | struct rcu_node; |
1217 | struct od_table_entry; | ||
1213 | 1218 | ||
1214 | enum perf_event_task_context { | 1219 | enum perf_event_task_context { |
1215 | perf_invalid_context = -1, | 1220 | perf_invalid_context = -1, |
@@ -1314,9 +1319,9 @@ struct task_struct { | |||
1314 | unsigned long stack_canary; | 1319 | unsigned long stack_canary; |
1315 | #endif | 1320 | #endif |
1316 | 1321 | ||
1317 | /* | 1322 | /* |
1318 | * pointers to (original) parent process, youngest child, younger sibling, | 1323 | * pointers to (original) parent process, youngest child, younger sibling, |
1319 | * older sibling, respectively. (p->father can be replaced with | 1324 | * older sibling, respectively. (p->father can be replaced with |
1320 | * p->real_parent->pid) | 1325 | * p->real_parent->pid) |
1321 | */ | 1326 | */ |
1322 | struct task_struct *real_parent; /* real parent process */ | 1327 | struct task_struct *real_parent; /* real parent process */ |
@@ -1534,6 +1539,12 @@ struct task_struct { | |||
1534 | int nr_dirtied; | 1539 | int nr_dirtied; |
1535 | int nr_dirtied_pause; | 1540 | int nr_dirtied_pause; |
1536 | 1541 | ||
1542 | /* LITMUS RT parameters and state */ | ||
1543 | struct rt_param rt_param; | ||
1544 | |||
1545 | /* references to PI semaphores, etc. */ | ||
1546 | struct od_table_entry *od_table; | ||
1547 | |||
1537 | #ifdef CONFIG_LATENCYTOP | 1548 | #ifdef CONFIG_LATENCYTOP |
1538 | int latency_record_count; | 1549 | int latency_record_count; |
1539 | struct latency_record latency_record[LT_SAVECOUNT]; | 1550 | struct latency_record latency_record[LT_SAVECOUNT]; |
@@ -2149,7 +2160,7 @@ static inline int dequeue_signal_lock(struct task_struct *tsk, sigset_t *mask, s | |||
2149 | spin_unlock_irqrestore(&tsk->sighand->siglock, flags); | 2160 | spin_unlock_irqrestore(&tsk->sighand->siglock, flags); |
2150 | 2161 | ||
2151 | return ret; | 2162 | return ret; |
2152 | } | 2163 | } |
2153 | 2164 | ||
2154 | extern void block_all_signals(int (*notifier)(void *priv), void *priv, | 2165 | extern void block_all_signals(int (*notifier)(void *priv), void *priv, |
2155 | sigset_t *mask); | 2166 | sigset_t *mask); |
@@ -2459,6 +2470,7 @@ static inline int test_tsk_thread_flag(struct task_struct *tsk, int flag) | |||
2459 | static inline void set_tsk_need_resched(struct task_struct *tsk) | 2470 | static inline void set_tsk_need_resched(struct task_struct *tsk) |
2460 | { | 2471 | { |
2461 | set_tsk_thread_flag(tsk,TIF_NEED_RESCHED); | 2472 | set_tsk_thread_flag(tsk,TIF_NEED_RESCHED); |
2473 | sched_state_will_schedule(tsk); | ||
2462 | } | 2474 | } |
2463 | 2475 | ||
2464 | static inline void clear_tsk_need_resched(struct task_struct *tsk) | 2476 | static inline void clear_tsk_need_resched(struct task_struct *tsk) |
diff --git a/include/linux/smp.h b/include/linux/smp.h index 8cc38d3bab0..53b1beef27a 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h | |||
@@ -82,6 +82,11 @@ int smp_call_function_any(const struct cpumask *mask, | |||
82 | smp_call_func_t func, void *info, int wait); | 82 | smp_call_func_t func, void *info, int wait); |
83 | 83 | ||
84 | /* | 84 | /* |
85 | * sends a 'pull timer' event to a remote CPU | ||
86 | */ | ||
87 | extern void smp_send_pull_timers(int cpu); | ||
88 | |||
89 | /* | ||
85 | * Generic and arch helpers | 90 | * Generic and arch helpers |
86 | */ | 91 | */ |
87 | #ifdef CONFIG_USE_GENERIC_SMP_HELPERS | 92 | #ifdef CONFIG_USE_GENERIC_SMP_HELPERS |
diff --git a/include/linux/tick.h b/include/linux/tick.h index b232ccc0ee2..1e29bd5b18a 100644 --- a/include/linux/tick.h +++ b/include/linux/tick.h | |||
@@ -74,6 +74,11 @@ extern int tick_is_oneshot_available(void); | |||
74 | extern struct tick_device *tick_get_device(int cpu); | 74 | extern struct tick_device *tick_get_device(int cpu); |
75 | 75 | ||
76 | # ifdef CONFIG_HIGH_RES_TIMERS | 76 | # ifdef CONFIG_HIGH_RES_TIMERS |
77 | /* LITMUS^RT tick alignment */ | ||
78 | #define LINUX_DEFAULT_TICKS 0 | ||
79 | #define LITMUS_ALIGNED_TICKS 1 | ||
80 | #define LITMUS_STAGGERED_TICKS 2 | ||
81 | |||
77 | extern int tick_init_highres(void); | 82 | extern int tick_init_highres(void); |
78 | extern int tick_program_event(ktime_t expires, int force); | 83 | extern int tick_program_event(ktime_t expires, int force); |
79 | extern void tick_setup_sched_timer(void); | 84 | extern void tick_setup_sched_timer(void); |