Merge tag 'v4.1' into p/abusse/merge_upgrade
[projects/modsched/linux.git] / kernel / sched / cfs / core.c
similarity index 99%
rename from kernel/sched/core.c
rename to kernel/sched/cfs/core.c
index 1236732..f08622d 100644 (file)
@@ -1706,6 +1706,10 @@ stat:
 out:
        raw_spin_unlock_irqrestore(&p->pi_lock, flags);
 
+//     if (test_tsk && ((int)test_tsk->pid == test_tsk_pid)) {
+//             printk("task(%i): try_to_wake_up -> %i\n", test_tsk_pid, TASK_RUNNING);
+//     }
+
        return success;
 }
 
@@ -1766,8 +1770,10 @@ EXPORT_SYMBOL(wake_up_process);
 
 int wake_up_state(struct task_struct *p, unsigned int state)
 {
+       WARN_ON(task_is_stopped_or_traced(p));
        return try_to_wake_up(p, state, 0);
 }
+EXPORT_SYMBOL(wake_up_process);
 
 /*
  * This function clears the sched_dl_entity static params.
@@ -2730,12 +2736,25 @@ again:
  * accordingly in case an event triggered the need for rescheduling (such as
  * an interrupt waking up a task) while preemption was disabled in __schedule().
  */
+//void print_rb_nodes(struct rq *rq) {
+//     struct task_struct *p;
+//
+//     if (!rq->cfs.rb_leftmost)
+//             return;
+//
+//     p = pick_next_task(rq);
+//     if (rq->cfs.rb_leftmost)
+//             print_rb_nodes(rq);
+//     put_prev_task(rq, p);
+//
+//     printk("%i ", p->pid);
+//}
 static void __sched __schedule(void)
 {
        struct task_struct *prev, *next;
        unsigned long *switch_count;
        struct rq *rq;
-       int cpu;
+       int i, cpu;
 
        preempt_disable();
        cpu = smp_processor_id();