diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-15 21:37:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-15 21:37:30 -0400 |
commit | 9620639b7ea3843983f4ced8b4c81eb4d8974838 (patch) | |
tree | 54266fac3bcf89e61ae06c7d36ca708df6e0ea33 /include | |
parent | a926021cb1f8a99a275eaf6eb546102e9469dc59 (diff) | |
parent | 6d1cafd8b56ea726c10a5a104de57cc3ed8fa953 (diff) |
Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (26 commits)
sched: Resched proper CPU on yield_to()
sched: Allow users with sufficient RLIMIT_NICE to change from SCHED_IDLE policy
sched: Allow SCHED_BATCH to preempt SCHED_IDLE tasks
sched: Clean up the IRQ_TIME_ACCOUNTING code
sched: Add #ifdef around irq time accounting functions
sched, autogroup: Stop claiming ownership of the root task group
sched, autogroup: Stop going ahead if autogroup is disabled
sched, autogroup, sysctl: Use proc_dointvec_minmax() instead
sched: Fix the group_imb logic
sched: Clean up some f_b_g() comments
sched: Clean up remnants of sd_idle
sched: Wholesale removal of sd_idle logic
sched: Add yield_to(task, preempt) functionality
sched: Use a buddy to implement yield_task_fair()
sched: Limit the scope of clear_buddies
sched: Check the right ->nr_running in yield_task_fair()
sched: Avoid expensive initial update_cfs_load(), on UP too
sched: Fix switch_from_fair()
sched: Simplify the idle scheduling class
softirqs: Account ksoftirqd time as cpustat softirq
...
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-generic/cputime.h | 3 | ||||
-rw-r--r-- | include/linux/interrupt.h | 7 | ||||
-rw-r--r-- | include/linux/jiffies.h | 1 | ||||
-rw-r--r-- | include/linux/sched.h | 13 |
4 files changed, 16 insertions, 8 deletions
diff --git a/include/asm-generic/cputime.h b/include/asm-generic/cputime.h index 2bcc5c7c22a6..61e03dd7939e 100644 --- a/include/asm-generic/cputime.h +++ b/include/asm-generic/cputime.h | |||
@@ -30,6 +30,9 @@ typedef u64 cputime64_t; | |||
30 | #define cputime64_to_jiffies64(__ct) (__ct) | 30 | #define cputime64_to_jiffies64(__ct) (__ct) |
31 | #define jiffies64_to_cputime64(__jif) (__jif) | 31 | #define jiffies64_to_cputime64(__jif) (__jif) |
32 | #define cputime_to_cputime64(__ct) ((u64) __ct) | 32 | #define cputime_to_cputime64(__ct) ((u64) __ct) |
33 | #define cputime64_gt(__a, __b) ((__a) > (__b)) | ||
34 | |||
35 | #define nsecs_to_cputime64(__ct) nsecs_to_jiffies64(__ct) | ||
33 | 36 | ||
34 | 37 | ||
35 | /* | 38 | /* |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index d746da19c6a2..2eb16e03422f 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -427,6 +427,13 @@ extern void raise_softirq(unsigned int nr); | |||
427 | */ | 427 | */ |
428 | DECLARE_PER_CPU(struct list_head [NR_SOFTIRQS], softirq_work_list); | 428 | DECLARE_PER_CPU(struct list_head [NR_SOFTIRQS], softirq_work_list); |
429 | 429 | ||
430 | DECLARE_PER_CPU(struct task_struct *, ksoftirqd); | ||
431 | |||
432 | static inline struct task_struct *this_cpu_ksoftirqd(void) | ||
433 | { | ||
434 | return this_cpu_read(ksoftirqd); | ||
435 | } | ||
436 | |||
430 | /* Try to send a softirq to a remote cpu. If this cannot be done, the | 437 | /* Try to send a softirq to a remote cpu. If this cannot be done, the |
431 | * work will be queued to the local cpu. | 438 | * work will be queued to the local cpu. |
432 | */ | 439 | */ |
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index 6811f4bfc6e7..922aa313c9f9 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h | |||
@@ -307,6 +307,7 @@ extern clock_t jiffies_to_clock_t(long x); | |||
307 | extern unsigned long clock_t_to_jiffies(unsigned long x); | 307 | extern unsigned long clock_t_to_jiffies(unsigned long x); |
308 | extern u64 jiffies_64_to_clock_t(u64 x); | 308 | extern u64 jiffies_64_to_clock_t(u64 x); |
309 | extern u64 nsec_to_clock_t(u64 x); | 309 | extern u64 nsec_to_clock_t(u64 x); |
310 | extern u64 nsecs_to_jiffies64(u64 n); | ||
310 | extern unsigned long nsecs_to_jiffies(u64 n); | 311 | extern unsigned long nsecs_to_jiffies(u64 n); |
311 | 312 | ||
312 | #define TIMESTAMP_SIZE 30 | 313 | #define TIMESTAMP_SIZE 30 |
diff --git a/include/linux/sched.h b/include/linux/sched.h index c57e5278df83..214af2ed11b5 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1058,6 +1058,7 @@ struct sched_class { | |||
1058 | void (*enqueue_task) (struct rq *rq, struct task_struct *p, int flags); | 1058 | void (*enqueue_task) (struct rq *rq, struct task_struct *p, int flags); |
1059 | void (*dequeue_task) (struct rq *rq, struct task_struct *p, int flags); | 1059 | void (*dequeue_task) (struct rq *rq, struct task_struct *p, int flags); |
1060 | void (*yield_task) (struct rq *rq); | 1060 | void (*yield_task) (struct rq *rq); |
1061 | bool (*yield_to_task) (struct rq *rq, struct task_struct *p, bool preempt); | ||
1061 | 1062 | ||
1062 | void (*check_preempt_curr) (struct rq *rq, struct task_struct *p, int flags); | 1063 | void (*check_preempt_curr) (struct rq *rq, struct task_struct *p, int flags); |
1063 | 1064 | ||
@@ -1084,12 +1085,10 @@ struct sched_class { | |||
1084 | void (*task_tick) (struct rq *rq, struct task_struct *p, int queued); | 1085 | void (*task_tick) (struct rq *rq, struct task_struct *p, int queued); |
1085 | void (*task_fork) (struct task_struct *p); | 1086 | void (*task_fork) (struct task_struct *p); |
1086 | 1087 | ||
1087 | void (*switched_from) (struct rq *this_rq, struct task_struct *task, | 1088 | void (*switched_from) (struct rq *this_rq, struct task_struct *task); |
1088 | int running); | 1089 | void (*switched_to) (struct rq *this_rq, struct task_struct *task); |
1089 | void (*switched_to) (struct rq *this_rq, struct task_struct *task, | ||
1090 | int running); | ||
1091 | void (*prio_changed) (struct rq *this_rq, struct task_struct *task, | 1090 | void (*prio_changed) (struct rq *this_rq, struct task_struct *task, |
1092 | int oldprio, int running); | 1091 | int oldprio); |
1093 | 1092 | ||
1094 | unsigned int (*get_rr_interval) (struct rq *rq, | 1093 | unsigned int (*get_rr_interval) (struct rq *rq, |
1095 | struct task_struct *task); | 1094 | struct task_struct *task); |
@@ -1715,7 +1714,6 @@ extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t * | |||
1715 | /* | 1714 | /* |
1716 | * Per process flags | 1715 | * Per process flags |
1717 | */ | 1716 | */ |
1718 | #define PF_KSOFTIRQD 0x00000001 /* I am ksoftirqd */ | ||
1719 | #define PF_STARTING 0x00000002 /* being created */ | 1717 | #define PF_STARTING 0x00000002 /* being created */ |
1720 | #define PF_EXITING 0x00000004 /* getting shut down */ | 1718 | #define PF_EXITING 0x00000004 /* getting shut down */ |
1721 | #define PF_EXITPIDONE 0x00000008 /* pi exit done on shut down */ | 1719 | #define PF_EXITPIDONE 0x00000008 /* pi exit done on shut down */ |
@@ -1945,8 +1943,6 @@ int sched_rt_handler(struct ctl_table *table, int write, | |||
1945 | void __user *buffer, size_t *lenp, | 1943 | void __user *buffer, size_t *lenp, |
1946 | loff_t *ppos); | 1944 | loff_t *ppos); |
1947 | 1945 | ||
1948 | extern unsigned int sysctl_sched_compat_yield; | ||
1949 | |||
1950 | #ifdef CONFIG_SCHED_AUTOGROUP | 1946 | #ifdef CONFIG_SCHED_AUTOGROUP |
1951 | extern unsigned int sysctl_sched_autogroup_enabled; | 1947 | extern unsigned int sysctl_sched_autogroup_enabled; |
1952 | 1948 | ||
@@ -1977,6 +1973,7 @@ static inline int rt_mutex_getprio(struct task_struct *p) | |||
1977 | # define rt_mutex_adjust_pi(p) do { } while (0) | 1973 | # define rt_mutex_adjust_pi(p) do { } while (0) |
1978 | #endif | 1974 | #endif |
1979 | 1975 | ||
1976 | extern bool yield_to(struct task_struct *p, bool preempt); | ||
1980 | extern void set_user_nice(struct task_struct *p, long nice); | 1977 | extern void set_user_nice(struct task_struct *p, long nice); |
1981 | extern int task_prio(const struct task_struct *p); | 1978 | extern int task_prio(const struct task_struct *p); |
1982 | extern int task_nice(const struct task_struct *p); | 1979 | extern int task_nice(const struct task_struct *p); |