]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - kernel/sched/sched.h
Merge branch 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux...
[karo-tx-linux.git] / kernel / sched / sched.h
index 369b4d663c42aea34ddba165332c30e9da2bc97f..31cc02ebc54ed82f5bf3f62fae879a1c0343a97d 100644 (file)
@@ -409,6 +409,8 @@ struct rt_rq {
        int overloaded;
        struct plist_head pushable_tasks;
 #endif
+       int rt_queued;
+
        int rt_throttled;
        u64 rt_time;
        u64 rt_runtime;
@@ -423,18 +425,6 @@ struct rt_rq {
 #endif
 };
 
-#ifdef CONFIG_RT_GROUP_SCHED
-static inline int rt_rq_throttled(struct rt_rq *rt_rq)
-{
-       return rt_rq->rt_throttled && !rt_rq->rt_nr_boosted;
-}
-#else
-static inline int rt_rq_throttled(struct rt_rq *rt_rq)
-{
-       return rt_rq->rt_throttled;
-}
-#endif
-
 /* Deadline class' related fields in a runqueue */
 struct dl_rq {
        /* runqueue is an rbtree, ordered by deadline */
@@ -577,7 +567,7 @@ struct rq {
        struct root_domain *rd;
        struct sched_domain *sd;
 
-       unsigned long cpu_power;
+       unsigned long cpu_capacity;
 
        unsigned char idle_balance;
        /* For active balancing */
@@ -680,6 +670,8 @@ extern int migrate_swap(struct task_struct *, struct task_struct *);
 
 #ifdef CONFIG_SMP
 
+extern void sched_ttwu_pending(void);
+
 #define rcu_dereference_check_sched_domain(p) \
        rcu_dereference_check((p), \
                              lockdep_is_held(&sched_domains_mutex))
@@ -738,15 +730,15 @@ DECLARE_PER_CPU(struct sched_domain *, sd_numa);
 DECLARE_PER_CPU(struct sched_domain *, sd_busy);
 DECLARE_PER_CPU(struct sched_domain *, sd_asym);
 
-struct sched_group_power {
+struct sched_group_capacity {
        atomic_t ref;
        /*
-        * CPU power of this group, SCHED_LOAD_SCALE being max power for a
-        * single CPU.
+        * CPU capacity of this group, SCHED_LOAD_SCALE being max capacity
+        * for a single CPU.
         */
-       unsigned int power, power_orig;
+       unsigned int capacity, capacity_orig;
        unsigned long next_update;
-       int imbalance; /* XXX unrelated to power but shared group state */
+       int imbalance; /* XXX unrelated to capacity but shared group state */
        /*
         * Number of busy cpus in this group.
         */
@@ -760,7 +752,7 @@ struct sched_group {
        atomic_t ref;
 
        unsigned int group_weight;
-       struct sched_group_power *sgp;
+       struct sched_group_capacity *sgc;
 
        /*
         * The CPUs this group covers.
@@ -783,7 +775,7 @@ static inline struct cpumask *sched_group_cpus(struct sched_group *sg)
  */
 static inline struct cpumask *sched_group_mask(struct sched_group *sg)
 {
-       return to_cpumask(sg->sgp->cpumask);
+       return to_cpumask(sg->sgc->cpumask);
 }
 
 /**
@@ -797,6 +789,10 @@ static inline unsigned int group_first_cpu(struct sched_group *group)
 
 extern int group_balance_cpu(struct sched_group *sg);
 
+#else
+
+static inline void sched_ttwu_pending(void) { }
+
 #endif /* CONFIG_SMP */
 
 #include "stats.h"
@@ -1177,7 +1173,7 @@ extern const struct sched_class idle_sched_class;
 
 #ifdef CONFIG_SMP
 
-extern void update_group_power(struct sched_domain *sd, int cpu);
+extern void update_group_capacity(struct sched_domain *sd, int cpu);
 
 extern void trigger_load_balance(struct rq *rq);
 
@@ -1216,12 +1212,14 @@ extern void update_idle_cpu_load(struct rq *this_rq);
 
 extern void init_task_runnable_average(struct task_struct *p);
 
-static inline void inc_nr_running(struct rq *rq)
+static inline void add_nr_running(struct rq *rq, unsigned count)
 {
-       rq->nr_running++;
+       unsigned prev_nr = rq->nr_running;
+
+       rq->nr_running = prev_nr + count;
 
 #ifdef CONFIG_NO_HZ_FULL
-       if (rq->nr_running == 2) {
+       if (prev_nr < 2 && rq->nr_running >= 2) {
                if (tick_nohz_full_cpu(rq->cpu)) {
                        /* Order rq->nr_running write against the IPI */
                        smp_wmb();
@@ -1231,9 +1229,9 @@ static inline void inc_nr_running(struct rq *rq)
 #endif
 }
 
-static inline void dec_nr_running(struct rq *rq)
+static inline void sub_nr_running(struct rq *rq, unsigned count)
 {
-       rq->nr_running--;
+       rq->nr_running -= count;
 }
 
 static inline void rq_last_tick_reset(struct rq *rq)