Re: [PATCH 1/2] sched: Minor cleanups

From: Ingo Molnar
Date: Mon Nov 19 2007 - 08:08:27 EST



* Srivatsa Vaddagiri <vatsa@xxxxxxxxxxxxxxxxxx> wrote:

> Minor scheduler cleanups:
>
> - Fix coding style
> - remove obsolete comment
> - Use list_for_each_entry_rcu when walking task group list

> #define for_each_leaf_cfs_rq(rq, cfs_rq) \
> - list_for_each_entry(cfs_rq, &rq->leaf_cfs_rq_list, leaf_cfs_rq_list)
> + list_for_each_entry_rcu(cfs_rq, &rq->leaf_cfs_rq_list, leaf_cfs_rq_list)
>
> /* Do the two (enqueued) entities belong to the same group ? */
> static inline int
> @@ -1126,7 +1126,10 @@ static void print_cfs_stats(struct seq_f
> #ifdef CONFIG_FAIR_GROUP_SCHED
> print_cfs_rq(m, cpu, &cpu_rq(cpu)->cfs);
> #endif
> +
> + rcu_read_lock();
> for_each_leaf_cfs_rq(cpu_rq(cpu), cfs_rq)
> print_cfs_rq(m, cpu, cfs_rq);
> + rcu_read_unlock();

hm, why is this a cleanup?

Ingo
-
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/