[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <466E0502.7000906@linux.vnet.ibm.com>
Date: Tue, 12 Jun 2007 07:59:22 +0530
From: Balbir Singh <balbir@...ux.vnet.ibm.com>
To: vatsa@...ux.vnet.ibm.com
CC: Ingo Molnar <mingo@...e.hu>, Nick Piggin <nickpiggin@...oo.com.au>,
efault@....de, kernel@...ivas.org, containers@...ts.osdl.org,
ckrm-tech@...ts.sourceforge.net, torvalds@...ux-foundation.org,
akpm@...ux-foundation.org, pwil3058@...pond.net.au,
tingy@...umass.edu, tong.n.li@...el.com, wli@...omorphy.com,
linux-kernel@...r.kernel.org, dmitry.adamushko@...il.com,
balbir@...ibm.com
Subject: Re: [RFC][PATCH 3/6] core changes in CFS
Srivatsa Vaddagiri wrote:
> +#define entity_is_task(se) 1
Could you add some comments as to what this means? Should be it boolean instead
(true)
> /*
> - * Enqueue a task into the rb-tree:
> + * Enqueue a entity into the rb-tree:
Enqueue an entity
> -static void limit_wait_runtime(struct rq *rq, struct task_struct *p)
> +static void limit_wait_runtime(struct lrq *lrq, struct sched_entity *p)
p is a general convention for tasks in the code, could we use something
different -- may be "e"?
>
> static s64 div64_s(s64 divident, unsigned long divisor)
> @@ -183,49 +219,51 @@
> * Update the current task's runtime statistics. Skip current tasks that
> * are not in our scheduling class.
> */
> -static inline void update_curr(struct rq *rq, u64 now)
> +static inline void update_curr(struct lrq *lrq, u64 now)
> {
> - unsigned long load = rq->lrq.raw_weighted_load;
> + unsigned long load = lrq->raw_weighted_load;
> u64 delta_exec, delta_fair, delta_mine;
> - struct task_struct *curr = rq->curr;
> + struct sched_entity *curr = lrq_curr(lrq);
How about curr_entity?
> + struct rq *rq = lrq_rq(lrq);
> + struct task_struct *curtask = rq->curr;
>
> - if (curr->sched_class != &fair_sched_class || curr == rq->idle || !load)
> + if (!curr || curtask == rq->idle || !load)
Can !curr ever be true? shoudn't we look into the sched_class of the task
that the entity belongs to?
--
Warm Regards,
Balbir Singh
Linux Technology Center
IBM, ISTL
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists