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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070824134510.GA21382@elte.hu>
Date:	Fri, 24 Aug 2007 15:45:10 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Al Boldi <a1426z@...ab.com>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	Mike Galbraith <efault@....de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: CFS review


* Al Boldi <a1426z@...ab.com> wrote:

> > > The problem is that consecutive runs don't give consistent results 
> > > and sometimes stalls.  You may want to try that.
> >
> > well, there's a natural saturation point after a few hundred tasks 
> > (depending on your CPU's speed), at which point there's no idle time 
> > left. From that point on things get slower progressively (and the 
> > ability of the shell to start new ping tasks is impacted as well), 
> > but that's expected on an overloaded system, isnt it?
> 
> Of course, things should get slower with higher load, but it should be 
> consistent without stalls.
> 
> To see this problem, make sure you boot into /bin/sh with the normal 
> VGA console (ie. not fb-console).  Then try each loop a few times to 
> show different behaviour; loops like:
> 
> # for ((i=0; i<3333; i++)); do ping 10.1 -A > /dev/null & done
> 
> # for ((i=0; i<3333; i++)); do nice -99 ping 10.1 -A > /dev/null & done
> 
> # { for ((i=0; i<3333; i++)); do
>         ping 10.1 -A > /dev/null &
>     done } > /dev/null 2>&1
> 
> Especially the last one sometimes causes a complete console lock-up, 
> while the other two sometimes stall then surge periodically.

ok. I think i might finally have found the bug causing this. Could you 
try the fix below, does your webserver thread-startup test work any 
better?

	Ingo

--------------------------->
Subject: sched: fix startup penalty calculation
From: Ingo Molnar <mingo@...e.hu>

fix task startup penalty miscalculation: sysctl_sched_granularity is
unsigned int and wait_runtime is long so we first have to convert it
to long before turning it negative ...

Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
 kernel/sched_fair.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux/kernel/sched_fair.c
===================================================================
--- linux.orig/kernel/sched_fair.c
+++ linux/kernel/sched_fair.c
@@ -1048,7 +1048,7 @@ static void task_new_fair(struct rq *rq,
 	 * -granularity/2, so initialize the task with that:
 	 */
 	if (sysctl_sched_features & SCHED_FEAT_START_DEBIT)
-		p->se.wait_runtime = -(sysctl_sched_granularity / 2);
+		p->se.wait_runtime = -((long)sysctl_sched_granularity / 2);
 
 	__enqueue_entity(cfs_rq, se);
 }
-
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