mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Williams <pwil3058@bigpond.net.au>
To: Andrew Morton <akpm@osdl.org>
Cc: kernel@kolivas.org, mingo@elte.hu, suresh.b.siddha@intel.com,
	efault@gmx.de, nickpiggin@yahoo.com.au,
	linux-kernel@vger.kernel.org, kenneth.w.chen@intel.com
Subject: Re: [PATCH] sched: Fix boolean expression in move_tasks()
Date: Tue, 25 Apr 2006 12:37:35 +1000	[thread overview]
Message-ID: <444D8B6F.7050601@bigpond.net.au> (raw)
In-Reply-To: <20060424191358.08c73e31.akpm@osdl.org>

Andrew Morton wrote:
> Peter Williams <pwil3058@bigpond.net.au> 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 <pwil3058@bigpond.com.au>
>>
>>  -- 
>>  Peter Williams                                   pwil3058@bigpond.net.au
>>
>>  "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?

Suresh's patch was wrong and this was intended as an alternative. 
Unfortunately, it is also in adequate and the setting of 
busiest_best_prio_seen needs to be moved to just after skip_for_load is 
set.  I have another patch that does that (and adds to the comments). 
Should I send that separately or roll the two patches together?

Peter
-- 
Peter Williams                                   pwil3058@bigpond.net.au

"Learning, n. The kind of ignorance distinguishing the studious."
  -- Ambrose Bierce

  reply	other threads:[~2006-04-25  2:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-24 23:47 Peter Williams
2006-04-25  2:13 ` Andrew Morton
2006-04-25  2:37   ` Peter Williams [this message]
2006-04-25  2:47     ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=444D8B6F.7050601@bigpond.net.au \
    --to=pwil3058@bigpond.net.au \
    --cc=akpm@osdl.org \
    --cc=efault@gmx.de \
    --cc=kenneth.w.chen@intel.com \
    --cc=kernel@kolivas.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=nickpiggin@yahoo.com.au \
    --cc=suresh.b.siddha@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®