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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 6 Nov 2008 21:38:53 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Ken Chen <kenchen@...gle.com>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Mike Galbraith <efault@....de>
Subject: Re: [patch] restore sched_exec load balance heuristics


* Ken Chen <kenchen@...gle.com> wrote:

> On Thu, Nov 6, 2008 at 12:07 PM, Ingo Molnar <mingo@...e.hu> wrote:
> > ok, this should be solved - but rather at the level of
> > sched_balance_self(): it should never migrate this task over to
> > another cpu, it should take away this task's load from the current
> > CPU's load when considering migration.
> 
> There are two callers to sched_balance_self().  In the sched_fork 
> path, sched_balance_self will balance the newly forked task.  I 
> think it is OK to bounce a newly forked task to another CPU since 
> current CPU will be busy when fork returns in the parent process.
> 
> And if sched_balance_self() needs to different between fork / exec 
> load balance, it has to check a flag from function argument, which I 
> think it is better to just short circuit in sched_exec() directly.

yes, but the problem is deeper than that and your fix only addresses 
teh most obvious case: when a single task is exec()-ing. But if we 
exec while there are two tasks on this CPU, and one task on every 
other CPU, we bounce around the "new" task unnecessarily just as much.

So the best solution is to pass in not a flag, but a 'load bias' 
offset - which is 0 in the fork case and -self-weight in the exec 
case.

Ok?

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