diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/fs.h | 19 | ||||
| -rw-r--r-- | include/linux/hardirq.h | 4 | ||||
| -rw-r--r-- | include/linux/hrtimer.h | 32 | ||||
| -rw-r--r-- | include/linux/sched.h | 20 | ||||
| -rw-r--r-- | include/linux/smp.h | 5 | ||||
| -rw-r--r-- | include/linux/tick.h | 5 |
6 files changed, 74 insertions, 11 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index cf7bc25928c..78987e9a384 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: */ |
| @@ -173,7 +173,7 @@ struct inodes_stat_t { | |||
| 173 | #define SEL_EX 4 | 173 | #define SEL_EX 4 |
| 174 | 174 | ||
| 175 | /* public flags for file_system_type */ | 175 | /* public flags for file_system_type */ |
| 176 | #define FS_REQUIRES_DEV 1 | 176 | #define FS_REQUIRES_DEV 1 |
| 177 | #define FS_BINARY_MOUNTDATA 2 | 177 | #define FS_BINARY_MOUNTDATA 2 |
| 178 | #define FS_HAS_SUBTYPE 4 | 178 | #define FS_HAS_SUBTYPE 4 |
| 179 | #define FS_REVAL_DOT 16384 /* Check the paths ".", ".." for staleness */ | 179 | #define FS_REVAL_DOT 16384 /* Check the paths ".", ".." for staleness */ |
| @@ -481,7 +481,7 @@ struct iattr { | |||
| 481 | */ | 481 | */ |
| 482 | #include <linux/quota.h> | 482 | #include <linux/quota.h> |
| 483 | 483 | ||
| 484 | /** | 484 | /** |
| 485 | * enum positive_aop_returns - aop return codes with specific semantics | 485 | * enum positive_aop_returns - aop return codes with specific semantics |
| 486 | * | 486 | * |
| 487 | * @AOP_WRITEPAGE_ACTIVATE: Informs the caller that page writeback has | 487 | * @AOP_WRITEPAGE_ACTIVATE: Informs the caller that page writeback has |
| @@ -491,7 +491,7 @@ struct iattr { | |||
| 491 | * be a candidate for writeback again in the near | 491 | * be a candidate for writeback again in the near |
| 492 | * future. Other callers must be careful to unlock | 492 | * future. Other callers must be careful to unlock |
| 493 | * the page if they get this return. Returned by | 493 | * the page if they get this return. Returned by |
| 494 | * writepage(); | 494 | * writepage(); |
| 495 | * | 495 | * |
| 496 | * @AOP_TRUNCATED_PAGE: The AOP method that was handed a locked page has | 496 | * @AOP_TRUNCATED_PAGE: The AOP method that was handed a locked page has |
| 497 | * unlocked it and the page might have been truncated. | 497 | * unlocked it and the page might have been truncated. |
| @@ -735,6 +735,7 @@ static inline int mapping_writably_mapped(struct address_space *mapping) | |||
| 735 | 735 | ||
| 736 | struct posix_acl; | 736 | struct posix_acl; |
| 737 | #define ACL_NOT_CACHED ((void *)(-1)) | 737 | #define ACL_NOT_CACHED ((void *)(-1)) |
| 738 | struct inode_obj_id_table; | ||
| 738 | 739 | ||
| 739 | #define IOP_FASTPERM 0x0001 | 740 | #define IOP_FASTPERM 0x0001 |
| 740 | #define IOP_LOOKUP 0x0002 | 741 | #define IOP_LOOKUP 0x0002 |
| @@ -1048,10 +1049,10 @@ static inline int file_check_writeable(struct file *filp) | |||
| 1048 | 1049 | ||
| 1049 | #define MAX_NON_LFS ((1UL<<31) - 1) | 1050 | #define MAX_NON_LFS ((1UL<<31) - 1) |
| 1050 | 1051 | ||
| 1051 | /* Page cache limit. The filesystems should put that into their s_maxbytes | 1052 | /* Page cache limit. The filesystems should put that into their s_maxbytes |
| 1052 | limits, otherwise bad things can happen in VM. */ | 1053 | limits, otherwise bad things can happen in VM. */ |
| 1053 | #if BITS_PER_LONG==32 | 1054 | #if BITS_PER_LONG==32 |
| 1054 | #define MAX_LFS_FILESIZE (((u64)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1) | 1055 | #define MAX_LFS_FILESIZE (((u64)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1) |
| 1055 | #elif BITS_PER_LONG==64 | 1056 | #elif BITS_PER_LONG==64 |
| 1056 | #define MAX_LFS_FILESIZE 0x7fffffffffffffffUL | 1057 | #define MAX_LFS_FILESIZE 0x7fffffffffffffffUL |
| 1057 | #endif | 1058 | #endif |
| @@ -2282,7 +2283,7 @@ extern void free_write_pipe(struct file *); | |||
| 2282 | 2283 | ||
| 2283 | extern int kernel_read(struct file *, loff_t, char *, unsigned long); | 2284 | extern int kernel_read(struct file *, loff_t, char *, unsigned long); |
| 2284 | extern struct file * open_exec(const char *); | 2285 | extern struct file * open_exec(const char *); |
| 2285 | 2286 | ||
| 2286 | /* fs/dcache.c -- generic fs support functions */ | 2287 | /* fs/dcache.c -- generic fs support functions */ |
| 2287 | extern int is_subdir(struct dentry *, struct dentry *); | 2288 | extern int is_subdir(struct dentry *, struct dentry *); |
| 2288 | extern int path_is_under(struct path *, struct path *); | 2289 | extern int path_is_under(struct path *, struct path *); |
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index f743883f769..ef18786a7b4 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: |
| @@ -186,6 +188,7 @@ extern void rcu_nmi_exit(void); | |||
| 186 | account_system_vtime(current); \ | 188 | account_system_vtime(current); \ |
| 187 | add_preempt_count(HARDIRQ_OFFSET); \ | 189 | add_preempt_count(HARDIRQ_OFFSET); \ |
| 188 | trace_hardirq_enter(); \ | 190 | trace_hardirq_enter(); \ |
| 191 | ft_irq_fired(); \ | ||
| 189 | } while (0) | 192 | } while (0) |
| 190 | 193 | ||
| 191 | /* | 194 | /* |
| @@ -216,6 +219,7 @@ extern void irq_exit(void); | |||
| 216 | lockdep_off(); \ | 219 | lockdep_off(); \ |
| 217 | rcu_nmi_enter(); \ | 220 | rcu_nmi_enter(); \ |
| 218 | trace_hardirq_enter(); \ | 221 | trace_hardirq_enter(); \ |
| 222 | ft_irq_fired(); \ | ||
| 219 | } while (0) | 223 | } while (0) |
| 220 | 224 | ||
| 221 | #define nmi_exit() \ | 225 | #define nmi_exit() \ |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index fd0dc30c9f1..d91bba539ca 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
| @@ -174,6 +174,7 @@ enum hrtimer_base_type { | |||
| 174 | * @nr_hangs: Total number of hrtimer interrupt hangs | 174 | * @nr_hangs: Total number of hrtimer interrupt hangs |
| 175 | * @max_hang_time: Maximum time spent in hrtimer_interrupt | 175 | * @max_hang_time: Maximum time spent in hrtimer_interrupt |
| 176 | * @clock_base: array of clock bases for this cpu | 176 | * @clock_base: array of clock bases for this cpu |
| 177 | * @to_pull: LITMUS^RT list of timers to be pulled on this cpu | ||
| 177 | */ | 178 | */ |
| 178 | struct hrtimer_cpu_base { | 179 | struct hrtimer_cpu_base { |
| 179 | raw_spinlock_t lock; | 180 | raw_spinlock_t lock; |
| @@ -188,8 +189,32 @@ struct hrtimer_cpu_base { | |||
| 188 | ktime_t max_hang_time; | 189 | ktime_t max_hang_time; |
| 189 | #endif | 190 | #endif |
| 190 | struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES]; | 191 | struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES]; |
| 192 | struct list_head to_pull; | ||
| 191 | }; | 193 | }; |
| 192 | 194 | ||
| 195 | #ifdef CONFIG_ARCH_HAS_SEND_PULL_TIMERS | ||
| 196 | |||
| 197 | #define HRTIMER_START_ON_INACTIVE 0 | ||
| 198 | #define HRTIMER_START_ON_QUEUED 1 | ||
| 199 | |||
| 200 | /* | ||
| 201 | * struct hrtimer_start_on_info - save timer info on remote cpu | ||
| 202 | * @list: list of hrtimer_start_on_info on remote cpu (to_pull) | ||
| 203 | * @timer: timer to be triggered on remote cpu | ||
| 204 | * @time: time event | ||
| 205 | * @mode: timer mode | ||
| 206 | * @state: activity flag | ||
| 207 | */ | ||
| 208 | struct hrtimer_start_on_info { | ||
| 209 | struct list_head list; | ||
| 210 | struct hrtimer *timer; | ||
| 211 | ktime_t time; | ||
| 212 | enum hrtimer_mode mode; | ||
| 213 | atomic_t state; | ||
| 214 | }; | ||
| 215 | |||
| 216 | #endif | ||
| 217 | |||
| 193 | static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time) | 218 | static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time) |
| 194 | { | 219 | { |
| 195 | timer->node.expires = time; | 220 | timer->node.expires = time; |
| @@ -355,6 +380,13 @@ __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim, | |||
| 355 | unsigned long delta_ns, | 380 | unsigned long delta_ns, |
| 356 | const enum hrtimer_mode mode, int wakeup); | 381 | const enum hrtimer_mode mode, int wakeup); |
| 357 | 382 | ||
| 383 | #ifdef CONFIG_ARCH_HAS_SEND_PULL_TIMERS | ||
| 384 | extern void hrtimer_start_on_info_init(struct hrtimer_start_on_info *info); | ||
| 385 | extern int hrtimer_start_on(int cpu, struct hrtimer_start_on_info *info, | ||
| 386 | struct hrtimer *timer, ktime_t time, | ||
| 387 | const enum hrtimer_mode mode); | ||
| 388 | #endif | ||
| 389 | |||
| 358 | extern int hrtimer_cancel(struct hrtimer *timer); | 390 | extern int hrtimer_cancel(struct hrtimer *timer); |
| 359 | extern int hrtimer_try_to_cancel(struct hrtimer *timer); | 391 | extern int hrtimer_try_to_cancel(struct hrtimer *timer); |
| 360 | 392 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 5bb4dd2e4c5..096834c7c63 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,10 @@ 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 | #include <litmus/fdso.h> | ||
| 100 | |||
| 96 | struct exec_domain; | 101 | struct exec_domain; |
| 97 | struct futex_pi_state; | 102 | struct futex_pi_state; |
| 98 | struct robust_list_head; | 103 | struct robust_list_head; |
| @@ -1209,6 +1214,7 @@ struct sched_rt_entity { | |||
| 1209 | }; | 1214 | }; |
| 1210 | 1215 | ||
| 1211 | struct rcu_node; | 1216 | struct rcu_node; |
| 1217 | struct od_table_entry; | ||
| 1212 | 1218 | ||
| 1213 | enum perf_event_task_context { | 1219 | enum perf_event_task_context { |
| 1214 | perf_invalid_context = -1, | 1220 | perf_invalid_context = -1, |
| @@ -1313,9 +1319,9 @@ struct task_struct { | |||
| 1313 | unsigned long stack_canary; | 1319 | unsigned long stack_canary; |
| 1314 | #endif | 1320 | #endif |
| 1315 | 1321 | ||
| 1316 | /* | 1322 | /* |
| 1317 | * pointers to (original) parent process, youngest child, younger sibling, | 1323 | * pointers to (original) parent process, youngest child, younger sibling, |
| 1318 | * older sibling, respectively. (p->father can be replaced with | 1324 | * older sibling, respectively. (p->father can be replaced with |
| 1319 | * p->real_parent->pid) | 1325 | * p->real_parent->pid) |
| 1320 | */ | 1326 | */ |
| 1321 | struct task_struct *real_parent; /* real parent process */ | 1327 | struct task_struct *real_parent; /* real parent process */ |
| @@ -1525,6 +1531,15 @@ struct task_struct { | |||
| 1525 | int make_it_fail; | 1531 | int make_it_fail; |
| 1526 | #endif | 1532 | #endif |
| 1527 | struct prop_local_single dirties; | 1533 | struct prop_local_single dirties; |
| 1534 | |||
| 1535 | /* LITMUS RT parameters and state */ | ||
| 1536 | struct rt_param rt_param; | ||
| 1537 | |||
| 1538 | /* references to PI semaphores, etc. */ | ||
| 1539 | struct od_table_entry *od_table; | ||
| 1540 | |||
| 1541 | resource_mask_t resources; | ||
| 1542 | |||
| 1528 | #ifdef CONFIG_LATENCYTOP | 1543 | #ifdef CONFIG_LATENCYTOP |
| 1529 | int latency_record_count; | 1544 | int latency_record_count; |
| 1530 | struct latency_record latency_record[LT_SAVECOUNT]; | 1545 | struct latency_record latency_record[LT_SAVECOUNT]; |
| @@ -2464,6 +2479,7 @@ static inline int test_tsk_thread_flag(struct task_struct *tsk, int flag) | |||
| 2464 | static inline void set_tsk_need_resched(struct task_struct *tsk) | 2479 | static inline void set_tsk_need_resched(struct task_struct *tsk) |
| 2465 | { | 2480 | { |
| 2466 | set_tsk_thread_flag(tsk,TIF_NEED_RESCHED); | 2481 | set_tsk_thread_flag(tsk,TIF_NEED_RESCHED); |
| 2482 | sched_state_will_schedule(tsk); | ||
| 2467 | } | 2483 | } |
| 2468 | 2484 | ||
| 2469 | static inline void clear_tsk_need_resched(struct task_struct *tsk) | 2485 | 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); |
