[patch] BFS 421: cleanup by removing rq_running

From: Hillf Danton
Date: Wed Jun 06 2012 - 09:22:12 EST


Again two points, good shot.


--- a/kernel/sched/bfs.c Wed Jun 6 20:19:12 2012
+++ b/kernel/sched/bfs.c Wed Jun 6 20:51:38 2012
@@ -246,7 +246,6 @@ struct rq {
int rq_time_slice;
u64 rq_last_ran;
int rq_prio;
- bool rq_running; /* There is a task running */

/* Accurate timekeeping data */
u64 timekeep_clock;
@@ -2044,7 +2043,8 @@ unsigned long nr_active(void)
/* Beyond a task running on this CPU, load is equal everywhere on BFS */
unsigned long this_cpu_load(void)
{
- return this_rq()->rq_running +
+ struct rq *rq = this_rq();
+ return (rq->curr != rq->idle) +
((queued_notrunning() + nr_uninterruptible()) / grq.noc);
}

@@ -3114,10 +3114,6 @@ static inline void set_rq_task(struct rq
rq->rq_last_ran = p->last_ran = rq->clock;
rq->rq_policy = p->policy;
rq->rq_prio = p->prio;
- if (p != rq->idle)
- rq->rq_running = true;
- else
- rq->rq_running = false;
}

static void reset_rq_task(struct rq *rq, struct task_struct *p)
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/