]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - include/linux/sched.h
Merge branch 'rcu/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck...
[linux-2.6.git] / include / linux / sched.h
index 4ac2c0578e0ff9133c4c761fcf3291879ae646d4..40d84481a1c98e98b67a819035bbb0976997a714 100644 (file)
@@ -90,6 +90,7 @@ struct sched_param {
 #include <linux/task_io_accounting.h>
 #include <linux/latencytop.h>
 #include <linux/cred.h>
+#include <linux/llist.h>
 
 #include <asm/processor.h>
 
@@ -270,12 +271,13 @@ extern void init_idle_bootup_task(struct task_struct *idle);
 
 extern int runqueue_is_locked(int cpu);
 
-extern cpumask_var_t nohz_cpu_mask;
 #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ)
 extern void select_nohz_load_balancer(int stop_tick);
+extern void set_cpu_sd_state_idle(void);
 extern int get_nohz_timer_target(void);
 #else
 static inline void select_nohz_load_balancer(int stop_tick) { }
+static inline void set_cpu_sd_state_idle(void) { }
 #endif
 
 /*
@@ -483,8 +485,8 @@ struct task_cputime {
 
 #define INIT_CPUTIME   \
        (struct task_cputime) {                                 \
-               .utime = cputime_zero,                          \
-               .stime = cputime_zero,                          \
+               .utime = 0,                                     \
+               .stime = 0,                                     \
                .sum_exec_runtime = 0,                          \
        }
 
@@ -510,7 +512,7 @@ struct task_cputime {
 struct thread_group_cputimer {
        struct task_cputime cputime;
        int running;
-       spinlock_t lock;
+       raw_spinlock_t lock;
 };
 
 #include <linux/rwsem.h>
@@ -901,6 +903,10 @@ struct sched_group_power {
         * single CPU.
         */
        unsigned int power, power_orig;
+       /*
+        * Number of busy cpus in this group.
+        */
+       atomic_t nr_busy_cpus;
 };
 
 struct sched_group {
@@ -925,6 +931,15 @@ static inline struct cpumask *sched_group_cpus(struct sched_group *sg)
        return to_cpumask(sg->cpumask);
 }
 
+/**
+ * group_first_cpu - Returns the first cpu in the cpumask of a sched_group.
+ * @group: The group whose first cpu is to be returned.
+ */
+static inline unsigned int group_first_cpu(struct sched_group *group)
+{
+       return cpumask_first(sched_group_cpus(group));
+}
+
 struct sched_domain_attr {
        int relax_domain_level;
 };
@@ -1225,7 +1240,7 @@ struct task_struct {
        unsigned int ptrace;
 
 #ifdef CONFIG_SMP
-       struct task_struct *wake_entry;
+       struct llist_node wake_entry;
        int on_cpu;
 #endif
        int on_rq;
@@ -1260,9 +1275,6 @@ struct task_struct {
 #ifdef CONFIG_PREEMPT_RCU
        int rcu_read_lock_nesting;
        char rcu_read_unlock_special;
-#if defined(CONFIG_RCU_BOOST) && defined(CONFIG_TREE_PREEMPT_RCU)
-       int rcu_boosted;
-#endif /* #if defined(CONFIG_RCU_BOOST) && defined(CONFIG_TREE_PREEMPT_RCU) */
        struct list_head rcu_node_entry;
 #endif /* #ifdef CONFIG_PREEMPT_RCU */
 #ifdef CONFIG_TREE_PREEMPT_RCU
@@ -1318,8 +1330,8 @@ struct task_struct {
         * older sibling, respectively.  (p->father can be replaced with 
         * p->real_parent->pid)
         */
-       struct task_struct *real_parent; /* real parent process */
-       struct task_struct *parent; /* recipient of SIGCHLD, wait4() reports */
+       struct task_struct __rcu *real_parent; /* real parent process */
+       struct task_struct __rcu *parent; /* recipient of SIGCHLD, wait4() reports */
        /*
         * children/sibling forms the list of my natural children
         */
@@ -1524,7 +1536,13 @@ struct task_struct {
 #ifdef CONFIG_FAULT_INJECTION
        int make_it_fail;
 #endif
-       struct prop_local_single dirties;
+       /*
+        * when (nr_dirtied >= nr_dirtied_pause), it's time to call
+        * balance_dirty_pages() for some dirty throttling pause
+        */
+       int nr_dirtied;
+       int nr_dirtied_pause;
+
 #ifdef CONFIG_LATENCYTOP
        int latency_record_count;
        struct latency_record latency_record[LT_SAVECOUNT];
@@ -1956,7 +1974,6 @@ static inline void disable_sched_clock_irqtime(void) {}
 
 extern unsigned long long
 task_sched_runtime(struct task_struct *task);
-extern unsigned long long thread_group_sched_runtime(struct task_struct *task);
 
 /* sched_exec is called by processes performing an exec */
 #ifdef CONFIG_SMP
@@ -2040,6 +2057,10 @@ static inline void sched_autogroup_fork(struct signal_struct *sig) { }
 static inline void sched_autogroup_exit(struct signal_struct *sig) { }
 #endif
 
+#ifdef CONFIG_CFS_BANDWIDTH
+extern unsigned int sysctl_sched_cfs_bandwidth_slice;
+#endif
+
 #ifdef CONFIG_RT_MUTEXES
 extern int rt_mutex_getprio(struct task_struct *p);
 extern void rt_mutex_setprio(struct task_struct *p, int prio);
@@ -2064,6 +2085,14 @@ extern int sched_setscheduler(struct task_struct *, int,
 extern int sched_setscheduler_nocheck(struct task_struct *, int,
                                      const struct sched_param *);
 extern struct task_struct *idle_task(int cpu);
+/**
+ * is_idle_task - is the specified task an idle task?
+ * @tsk: the task in question.
+ */
+static inline bool is_idle_task(const struct task_struct *p)
+{
+       return p->pid == 0;
+}
 extern struct task_struct *curr_task(int cpu);
 extern void set_curr_task(int cpu, struct task_struct *p);
 
@@ -2166,7 +2195,8 @@ extern int force_sigsegv(int, struct task_struct *);
 extern int force_sig_info(int, struct siginfo *, struct task_struct *);
 extern int __kill_pgrp_info(int sig, struct siginfo *info, struct pid *pgrp);
 extern int kill_pid_info(int sig, struct siginfo *info, struct pid *pid);
-extern int kill_pid_info_as_uid(int, struct siginfo *, struct pid *, uid_t, uid_t, u32);
+extern int kill_pid_info_as_cred(int, struct siginfo *, struct pid *,
+                               const struct cred *, u32);
 extern int kill_pgrp(struct pid *pid, int sig, int priv);
 extern int kill_pid(struct pid *pid, int sig, int priv);
 extern int kill_proc_info(int, struct siginfo *, pid_t);
@@ -2566,7 +2596,7 @@ void thread_group_cputimer(struct task_struct *tsk, struct task_cputime *times);
 
 static inline void thread_group_cputime_init(struct signal_struct *sig)
 {
-       spin_lock_init(&sig->cputimer.lock);
+       raw_spin_lock_init(&sig->cputimer.lock);
 }
 
 /*