lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <49E6887D.6030400@cn.fujitsu.com>
Date:	Thu, 16 Apr 2009 09:23:09 +0800
From:	Miao Xie <miaox@...fujitsu.com>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
CC:	Ingo Molnar <mingo@...e.hu>,
	Linux-Kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] sched: fix off-by-one bug in balance_tasks()

on 2009-4-15 19:41 Peter Zijlstra wrote:
> On Wed, 2009-04-15 at 10:49 +0800, Miao Xie wrote:
>> If the load that need be moved equals the half weight of a task, I think
>> it is unnecessary to move this task. Or this task will be moved back and
>> forth.
> 
> That's actually desirable. Consider the 3 tasks on 2 cpus statically
> infeasible scenario. There you'd want the tasks to bounce around a bit
> in order to provide fairness.

I see. Thanks for your explanation.

Miao Xie
> 
>> Signed-off-by: Miao Xie <miaox@...fujitsu.com>
>> ---
>>  kernel/sched.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/kernel/sched.c b/kernel/sched.c
>> index 5724508..44926c8 100644
>> --- a/kernel/sched.c
>> +++ b/kernel/sched.c
>> @@ -3085,7 +3085,7 @@ next:
>>  	if (!p || loops++ > sysctl_sched_nr_migrate)
>>  		goto out;
>>  
>> -	if ((p->se.load.weight >> 1) > rem_load_move ||
>> +	if ((p->se.load.weight >> 1) >= rem_load_move ||
>>  	    !can_migrate_task(p, busiest, this_cpu, sd, idle, &pinned)) {
>>  		p = iterator->next(iterator->arg);
>>  		goto next;
> 
> 
> 
> 


--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ