[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <loom.20071109T123749-481@post.gmane.org>
Date: Fri, 9 Nov 2007 12:41:28 +0000 (UTC)
From: DM <dm.n9107@...il.com>
To: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sched: avoid large irq-latencies in smp-balancing
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@...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