aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorRobert Richter <robert.richter@amd.com>2010-10-25 10:28:14 -0400
committerRobert Richter <robert.richter@amd.com>2010-10-25 10:29:12 -0400
commitdbd1e66e04558a582e673bc4a9cd933ce0228d93 (patch)
tree85f3633276282cde0a3ac558d988704eaa3e68af /include/linux/sched.h
parent328b8f1ba50b708a1b3c0acd7c41ee1b356822f6 (diff)
parent4a60cfa9457749f7987fd4f3c956dbba5a281129 (diff)
Merge commit 'linux-2.6/master' (early part) into oprofile/core
This branch depends on these apic patches: apic, x86: Use BIOS settings for IBS and MCE threshold interrupt LVT offsets apic, x86: Check if EILVT APIC registers are available (AMD only) Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h39
1 files changed, 28 insertions, 11 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index eb3c1ceec06e..0383601a927c 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -875,6 +875,7 @@ enum sched_domain_level {
875 SD_LV_NONE = 0, 875 SD_LV_NONE = 0,
876 SD_LV_SIBLING, 876 SD_LV_SIBLING,
877 SD_LV_MC, 877 SD_LV_MC,
878 SD_LV_BOOK,
878 SD_LV_CPU, 879 SD_LV_CPU,
879 SD_LV_NODE, 880 SD_LV_NODE,
880 SD_LV_ALLNODES, 881 SD_LV_ALLNODES,
@@ -1209,11 +1210,13 @@ struct task_struct {
1209 unsigned int policy; 1210 unsigned int policy;
1210 cpumask_t cpus_allowed; 1211 cpumask_t cpus_allowed;
1211 1212
1212#ifdef CONFIG_TREE_PREEMPT_RCU 1213#ifdef CONFIG_PREEMPT_RCU
1213 int rcu_read_lock_nesting; 1214 int rcu_read_lock_nesting;
1214 char rcu_read_unlock_special; 1215 char rcu_read_unlock_special;
1215 struct rcu_node *rcu_blocked_node;
1216 struct list_head rcu_node_entry; 1216 struct list_head rcu_node_entry;
1217#endif /* #ifdef CONFIG_PREEMPT_RCU */
1218#ifdef CONFIG_TREE_PREEMPT_RCU
1219 struct rcu_node *rcu_blocked_node;
1217#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */ 1220#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
1218 1221
1219#if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) 1222#if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT)
@@ -1295,9 +1298,9 @@ struct task_struct {
1295 struct list_head cpu_timers[3]; 1298 struct list_head cpu_timers[3];
1296 1299
1297/* process credentials */ 1300/* process credentials */
1298 const struct cred *real_cred; /* objective and real subjective task 1301 const struct cred __rcu *real_cred; /* objective and real subjective task
1299 * credentials (COW) */ 1302 * credentials (COW) */
1300 const struct cred *cred; /* effective (overridable) subjective task 1303 const struct cred __rcu *cred; /* effective (overridable) subjective task
1301 * credentials (COW) */ 1304 * credentials (COW) */
1302 struct mutex cred_guard_mutex; /* guard against foreign influences on 1305 struct mutex cred_guard_mutex; /* guard against foreign influences on
1303 * credential calculations 1306 * credential calculations
@@ -1425,7 +1428,7 @@ struct task_struct {
1425#endif 1428#endif
1426#ifdef CONFIG_CGROUPS 1429#ifdef CONFIG_CGROUPS
1427 /* Control Group info protected by css_set_lock */ 1430 /* Control Group info protected by css_set_lock */
1428 struct css_set *cgroups; 1431 struct css_set __rcu *cgroups;
1429 /* cg_list protected by css_set_lock and tsk->alloc_lock */ 1432 /* cg_list protected by css_set_lock and tsk->alloc_lock */
1430 struct list_head cg_list; 1433 struct list_head cg_list;
1431#endif 1434#endif
@@ -1688,8 +1691,7 @@ extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t *
1688/* 1691/*
1689 * Per process flags 1692 * Per process flags
1690 */ 1693 */
1691#define PF_ALIGNWARN 0x00000001 /* Print alignment warning msgs */ 1694#define PF_KSOFTIRQD 0x00000001 /* I am ksoftirqd */
1692 /* Not implemented yet, only for 486*/
1693#define PF_STARTING 0x00000002 /* being created */ 1695#define PF_STARTING 0x00000002 /* being created */
1694#define PF_EXITING 0x00000004 /* getting shut down */ 1696#define PF_EXITING 0x00000004 /* getting shut down */
1695#define PF_EXITPIDONE 0x00000008 /* pi exit done on shut down */ 1697#define PF_EXITPIDONE 0x00000008 /* pi exit done on shut down */
@@ -1747,7 +1749,7 @@ extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t *
1747#define tsk_used_math(p) ((p)->flags & PF_USED_MATH) 1749#define tsk_used_math(p) ((p)->flags & PF_USED_MATH)
1748#define used_math() tsk_used_math(current) 1750#define used_math() tsk_used_math(current)
1749 1751
1750#ifdef CONFIG_TREE_PREEMPT_RCU 1752#ifdef CONFIG_PREEMPT_RCU
1751 1753
1752#define RCU_READ_UNLOCK_BLOCKED (1 << 0) /* blocked while in RCU read-side. */ 1754#define RCU_READ_UNLOCK_BLOCKED (1 << 0) /* blocked while in RCU read-side. */
1753#define RCU_READ_UNLOCK_NEED_QS (1 << 1) /* RCU core needs CPU response. */ 1755#define RCU_READ_UNLOCK_NEED_QS (1 << 1) /* RCU core needs CPU response. */
@@ -1756,7 +1758,9 @@ static inline void rcu_copy_process(struct task_struct *p)
1756{ 1758{
1757 p->rcu_read_lock_nesting = 0; 1759 p->rcu_read_lock_nesting = 0;
1758 p->rcu_read_unlock_special = 0; 1760 p->rcu_read_unlock_special = 0;
1761#ifdef CONFIG_TREE_PREEMPT_RCU
1759 p->rcu_blocked_node = NULL; 1762 p->rcu_blocked_node = NULL;
1763#endif
1760 INIT_LIST_HEAD(&p->rcu_node_entry); 1764 INIT_LIST_HEAD(&p->rcu_node_entry);
1761} 1765}
1762 1766
@@ -1833,6 +1837,19 @@ extern void sched_clock_idle_sleep_event(void);
1833extern void sched_clock_idle_wakeup_event(u64 delta_ns); 1837extern void sched_clock_idle_wakeup_event(u64 delta_ns);
1834#endif 1838#endif
1835 1839
1840#ifdef CONFIG_IRQ_TIME_ACCOUNTING
1841/*
1842 * An i/f to runtime opt-in for irq time accounting based off of sched_clock.
1843 * The reason for this explicit opt-in is not to have perf penalty with
1844 * slow sched_clocks.
1845 */
1846extern void enable_sched_clock_irqtime(void);
1847extern void disable_sched_clock_irqtime(void);
1848#else
1849static inline void enable_sched_clock_irqtime(void) {}
1850static inline void disable_sched_clock_irqtime(void) {}
1851#endif
1852
1836extern unsigned long long 1853extern unsigned long long
1837task_sched_runtime(struct task_struct *task); 1854task_sched_runtime(struct task_struct *task);
1838extern unsigned long long thread_group_sched_runtime(struct task_struct *task); 1855extern unsigned long long thread_group_sched_runtime(struct task_struct *task);
@@ -2374,9 +2391,9 @@ extern int __cond_resched_lock(spinlock_t *lock);
2374 2391
2375extern int __cond_resched_softirq(void); 2392extern int __cond_resched_softirq(void);
2376 2393
2377#define cond_resched_softirq() ({ \ 2394#define cond_resched_softirq() ({ \
2378 __might_sleep(__FILE__, __LINE__, SOFTIRQ_OFFSET); \ 2395 __might_sleep(__FILE__, __LINE__, SOFTIRQ_DISABLE_OFFSET); \
2379 __cond_resched_softirq(); \ 2396 __cond_resched_softirq(); \
2380}) 2397})
2381 2398
2382/* 2399/*