lkml.org 
[lkml]   [2007]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] sched: avoid large irq-latencies in smp-balancing
Date
Peter Zijlstra <peterz <at> infradead.org> writes:
> @@ -2237,7 +2243,7 @@ balance_tasks(struct rq *this_rq, int th
> enum cpu_idle_type idle, int *all_pinned,
> int *this_best_prio, struct rq_iterator *iterator)
> {
> - int pulled = 0, pinned = 0, skip_for_load;
> + int loops = 0, pulled = 0, pinned = 0, skip_for_load;
> struct task_struct *p;
> long rem_load_move = max_load_move;
>
> @@ -2251,10 +2257,10 @@ balance_tasks(struct rq *this_rq, int th
> */
> p = iterator->start(iterator->arg);
> next:
> - if (!p)
> + if (!p || loops++ > sysctl_sched_nr_migrate)
> goto out;

Looks to me like an off-by-one thingy. If sysctl_sched_nr_migrate is zero we
can still migrate one task. Feature or bug?

/dm


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-11-09 13:45    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site