public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.4.4 sluggish under fork load
@ 2001-04-28 11:52 Peter Osterlund
  2001-04-28 14:16 ` J . A . Magallon
                   ` (4 more replies)
  0 siblings, 5 replies; 21+ messages in thread
From: Peter Osterlund @ 2001-04-28 11:52 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel

I have noticed that 2.4.4 feels a lot less responsive than 2.4.3 under
fork load. This is caused by the "run child first after fork" patch. I
have tested on two different UP x86 systems running redhat 7.0.

For example, when running the gcc configure script, the X mouse pointer is
very jerky. The configure script itself runs approximately as fast as in
2.4.3.

Another thing is that the bash loop "while true ; do /bin/true ; done" is
not possible to interrupt with ctrl-c.

A third thing I noticed is that starting a gnome session in redhat 7.0
takes longer. (It takes more time for the gnome splash screen to appear.)

Reverting the fork patch makes all these problems go away on my machine.
I'm not saying that this is necessarily a good idea, that patch might be
good for other reasons.


--- linux-2.4.4/kernel/fork.c~	Sat Apr 28 09:46:58 2001
+++ linux-2.4.4/kernel/fork.c	Sat Apr 28 11:14:33 2001
@@ -674,9 +674,16 @@
 	 * and then exec(). This is only important in the first timeslice.
 	 * In the long run, the scheduling behavior is unchanged.
 	 */
+#if 0
 	p->counter = current->counter;
 	current->counter = 0;
 	current->need_resched = 1;
+#else
+	p->counter = (current->counter + 1) >> 1;
+	current->counter >>= 1;
+	if (!current->counter)
+		current->need_resched = 1;
+#endif

 	/*
 	 * Ok, add it to the run-queues and make it

-- 
Peter Österlund             peter.osterlund@mailbox.swipnet.se
Sköndalsvägen 35            http://home1.swipnet.se/~w-15919
S-128 66 Sköndal            +46 8 942647
Sweden



^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: 2.4.4 sluggish under fork load
@ 2001-04-29  7:14 Adam J. Richter
  0 siblings, 0 replies; 21+ messages in thread
From: Adam J. Richter @ 2001-04-29  7:14 UTC (permalink / raw)
  To: linux-kernel, mhaque, peter.osterlund; +Cc: torvalds

Peter Osterlund wrote:
> Another thing is that the bash loop "while true ; do /bin/true ; done" is
> not possible to interrupt with ctrl-c.

	I have reproduced this on a uniprocessor machine and determined
that it is a bash bug.  I will submit a bash bug report and sample
patch that fixes the problem (but may be incorrect in other ways), and
will cc it to linux-kernel.  Look for the subject "Patch(?): bash-2.05/jobs.c
loses interrupts."

	I have not yet investigated the other report of "sluggish" behavior.

Adam J. Richter     __     ______________   4880 Stevens Creek Blvd, Suite 104
adam@yggdrasil.com     \ /                  San Jose, California 95129-1034
+1 408 261-6630         | g g d r a s i l   United States of America
fax +1 408 261-6631      "Free Software For The Rest Of Us."

^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: 2.4.4 sluggish under fork load
@ 2001-04-29  8:04 Adam J. Richter
  0 siblings, 0 replies; 21+ messages in thread
From: Adam J. Richter @ 2001-04-29  8:04 UTC (permalink / raw)
  To: linux-kernel

	On rereading Linus's message, I see that he indicated that
"while true ; do /bin/true ; done" was known to be a bash bug, not
just a suggested possibility.  Sorry for acting as if this were
a new discovery.  Anyhow, I hope that at least the proposed bash
patch that I submitted may be of some use.

Adam J. Richter     __     ______________   4880 Stevens Creek Blvd, Suite 104
adam@yggdrasil.com     \ /                  San Jose, California 95129-1034
+1 408 261-6630         | g g d r a s i l   United States of America
fax +1 408 261-6631      "Free Software For The Rest Of Us."

^ permalink raw reply	[flat|nested] 21+ messages in thread
[parent not found: <Pine.LNX.4.21.0104281928080.10759-100000@penguin.transmeta.com>]
* Re: 2.4.4 sluggish under fork load
@ 2001-05-01  4:18 Adam J. Richter
  0 siblings, 0 replies; 21+ messages in thread
From: Adam J. Richter @ 2001-05-01  4:18 UTC (permalink / raw)
  To: riel; +Cc: linux-kernel

>The fact that 2.4.4 gives the whole timeslice to the child
>is just bogus to begin with.

        I only did that because I could not find another way
to make the child run first that worked in practice.  I tried
other things before that.  Since Peter Osterlund's SCHED_YIELD
thing works, we no longer have to give all of the CPU to the
child.  The scheduler time slices are currently enormous, so as
long as the child gets even one clock tick before the parent runs,
it should reach the exec() if that is its plan.  1 tick = 10ms = 10
million cycles on a 1GHz CPU, which should be enough time to encrypt
my /boot/vmlinux in twofish if it's in RAM.

Adam J. Richter     __     ______________   4880 Stevens Creek Blvd, Suite 104
adam@yggdrasil.com     \ /                  San Jose, California 95129-1034
+1 408 261-6630         | g g d r a s i l   United States of America
fax +1 408 261-6631      "Free Software For The Rest Of Us."

^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: 2.4.4 sluggish under fork load
@ 2001-05-03 14:02 Hubertus Franke
  0 siblings, 0 replies; 21+ messages in thread
From: Hubertus Franke @ 2001-05-03 14:02 UTC (permalink / raw)
  To: Adam J. Richter; +Cc: riel, linux-kernel


I pointed that out to the folk who proposed this and
gave him a fix that ensures that the child has at least a value of 2
higher.

Given the child all and the parent nothing is TOTAL BOGUS. The parent
essentially has to wait for a recalculate.
This so-called fix has to go in the next release.


Hubertus Franke
Enterprise Linux Group (Mgr),  Linux Technology Center (Member Scalability)
, OS-PIC (Chair)
email: frankeh@us.ibm.com
(w) 914-945-2003    (fax) 914-945-4425   TL: 862-2003



"Adam J. Richter" <adam@yggdrasil.com>@vger.kernel.org on 05/01/2001
12:18:10 AM

Sent by:  linux-kernel-owner@vger.kernel.org


To:   riel@conectiva.com.br
cc:   linux-kernel@vger.kernel.org
Subject:  Re: 2.4.4 sluggish under fork load



>The fact that 2.4.4 gives the whole timeslice to the child
>is just bogus to begin with.

        I only did that because I could not find another way
to make the child run first that worked in practice.  I tried
other things before that.  Since Peter Osterlund's SCHED_YIELD
thing works, we no longer have to give all of the CPU to the
child.  The scheduler time slices are currently enormous, so as
long as the child gets even one clock tick before the parent runs,
it should reach the exec() if that is its plan.  1 tick = 10ms = 10
million cycles on a 1GHz CPU, which should be enough time to encrypt
my /boot/vmlinux in twofish if it's in RAM.

Adam J. Richter     __     ______________   4880 Stevens Creek Blvd, Suite
104
adam@yggdrasil.com     \ /                  San Jose, California 95129-1034
+1 408 261-6630         | g g d r a s i l   United States of America
fax +1 408 261-6631      "Free Software For The Rest Of Us."
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/




^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2001-05-03 14:06 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-28 11:52 2.4.4 sluggish under fork load Peter Osterlund
2001-04-28 14:16 ` J . A . Magallon
2001-04-28 14:26 ` Mohammad A. Haque
2001-04-28 15:07 ` Rene Puls
2001-04-28 17:10   ` John Kacur
2001-04-28 18:00     ` Peter Osterlund
2001-04-28 17:54 ` Linus Torvalds
2001-04-28 19:14   ` Peter Osterlund
2001-04-28 20:00 ` Harald Dunkel
  -- strict thread matches above, loose matches on Subject: below --
2001-04-29  7:14 Adam J. Richter
2001-04-29  8:04 Adam J. Richter
     [not found] <Pine.LNX.4.21.0104281928080.10759-100000@penguin.transmeta.com>
2001-04-29  8:26 ` Peter Osterlund
2001-04-30 17:51   ` Andrea Arcangeli
2001-04-30 21:45     ` Peter Osterlund
2001-05-01  2:38     ` Rik van Riel
2001-05-01  5:18       ` Andrea Arcangeli
2001-05-01 16:55         ` Andrea Arcangeli
2001-05-01 17:33           ` J . A . Magallon
2001-05-01 20:34           ` Alan Cox
2001-05-01  4:18 Adam J. Richter
2001-05-03 14:02 Hubertus Franke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox