Re: [PATCH] sched: Fix boolean expression in move_tasks()

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

 



Peter Williams <[email protected]> wrote:
>
> Negate the expression and apply de Marcos rule to simplify it.  This 
>  patch is on top of 
>  sched-avoid-unnecessarily-moving-highest-priority-task-move_tasks.patch
> 
>  Signed-off-by: Peter Williams <[email protected]>
> 
>  -- 
>  Peter Williams                                   [email protected]
> 
>  "Learning, n. The kind of ignorance distinguishing the studious."
>    -- Ambrose Bierce
> 
> 
> [smpnice-fix-boolean-expression  text/plain (824 bytes)]
>  Index: MM-2.6.17-rc1-mm3/kernel/sched.c
>  ===================================================================
>  --- MM-2.6.17-rc1-mm3.orig/kernel/sched.c	2006-04-21 12:26:54.000000000 +1000
>  +++ MM-2.6.17-rc1-mm3/kernel/sched.c	2006-04-25 09:09:54.000000000 +1000
>  @@ -2108,7 +2108,7 @@ skip_queue:
>   	 */
>   	skip_for_load = tmp->load_weight > rem_load_move;
>   	if (skip_for_load && idx < this_best_prio)
>  -		skip_for_load = busiest_best_prio_seen || idx != busiest_best_prio;
>  +		skip_for_load = !busiest_best_prio_seen && idx == busiest_best_prio;

But Suresh's
sched-avoid-unnecessarily-moving-highest-priority-task-move_tasks-fix.patch
changed all this code:

	/*
	 * To help distribute high priority tasks accross CPUs we don't
	 * skip a task if it will be the highest priority task (i.e. smallest
	 * prio value) on its new queue regardless of its load weight
	 */
	skip_for_load = tmp->load_weight > rem_load_move;
	if (skip_for_load && idx < this_best_prio && idx == busiest_best_prio)
		skip_for_load = !busiest_best_prio_seen &&
				head->next == head->prev;
	if (skip_for_load ||
	    !can_migrate_task(tmp, busiest, this_cpu, sd, idle, &pinned)) {
		if (curr != head)
			goto skip_queue;
		idx++;
		goto skip_bitmap;
	}


What to do?
-
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