]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/sched.h
Merge branch 'x86/boot'
[karo-tx-linux.git] / include / linux / sched.h
index 0dd42a02df2e851e0847df640dd559f3689c36ed..e1581a029e3d3187ae125b8effd15d0a94d68730 100644 (file)
@@ -1061,6 +1061,7 @@ struct sched_class {
 
 #ifdef CONFIG_SMP
        int  (*select_task_rq)(struct task_struct *p, int sd_flag, int flags);
+       void (*migrate_task_rq)(struct task_struct *p, int next_cpu);
 
        void (*pre_schedule) (struct rq *this_rq, struct task_struct *task);
        void (*post_schedule) (struct rq *this_rq);
@@ -1095,6 +1096,18 @@ struct load_weight {
        unsigned long weight, inv_weight;
 };
 
+struct sched_avg {
+       /*
+        * These sums represent an infinite geometric series and so are bound
+        * above by 1024/(1-y).  Thus we only need a u32 to store them for for all
+        * choices of y < 1-2^(-32)*1024.
+        */
+       u32 runnable_avg_sum, runnable_avg_period;
+       u64 last_runnable_update;
+       s64 decay_count;
+       unsigned long load_avg_contrib;
+};
+
 #ifdef CONFIG_SCHEDSTATS
 struct sched_statistics {
        u64                     wait_start;
@@ -1155,6 +1168,15 @@ struct sched_entity {
        /* rq "owned" by this entity/group: */
        struct cfs_rq           *my_q;
 #endif
+/*
+ * Load-tracking only depends on SMP, FAIR_GROUP_SCHED dependency below may be
+ * removed when useful for applications beyond shares distribution (e.g.
+ * load-balance).
+ */
+#if defined(CONFIG_SMP) && defined(CONFIG_FAIR_GROUP_SCHED)
+       /* Per-entity load-tracking */
+       struct sched_avg        avg;
+#endif
 };
 
 struct sched_rt_entity {