Re: [PATCH] sched: avoid large irq-latencies in smp-balancing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux