public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>,
	Pekka Enberg <penberg@gmail.com>,
	Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Machine Freezes while Running Crossover Office
Date: Tue, 31 May 2005 20:41:01 +0200	[thread overview]
Message-ID: <20050531184101.GA3175@elte.hu> (raw)
In-Reply-To: <Pine.LNX.4.58.0505311010410.1876@ppc970.osdl.org>


* Linus Torvalds <torvalds@osdl.org> wrote:

> Ingo, any ideas? This is bothersome, because it could hit any number 
> of people, and we'd never have realized because it's not usually 
> repeatable and not usually quite that extreme. [...]

it's the fundamental unfairness of the interactivity code (or any 
interactivity code that plays favorites between tasks), and the larger 
pipe buffers made this more common it seems. It's quite dangerous to 
tune the scheduler so close to 2.6.12, but the issue seems serious 
enough. I think we could try to change INTERACTIVE_DELTA from 2 to 3 (or
even 4) instead of turning off the back-into-the-active-array logic
altogether.

Pekka, i've attached a quick hack that turns INTERACTIVE_DELTA into a 
runtime tunable. It defaults to the stock value of 2, but a value of '5' 
should be equivalent to the other patch you tried (but is less hacky).  

Now, assuming you can confirm that doing:

  echo 5 > /proc/sys/kernel/INTERACTIVE_DELTA

fixes the problem (all other things should be back to the default, i.e.  
no renicing of anything), then it would be interesting to find the 
minimum value where the problem goes away. I.e. we know that 2 is bad, 
but how bad are values 3 and 4?

	Ingo

--- linux/kernel/sched.c.orig
+++ linux/kernel/sched.c
@@ -90,7 +90,7 @@
 #define EXIT_WEIGHT		  3
 #define PRIO_BONUS_RATIO	 25
 #define MAX_BONUS		(MAX_USER_PRIO * PRIO_BONUS_RATIO / 100)
-#define INTERACTIVE_DELTA	  2
+int INTERACTIVE_DELTA = 2;
 #define MAX_SLEEP_AVG		(DEF_TIMESLICE * MAX_BONUS)
 #define STARVATION_LIMIT	(MAX_SLEEP_AVG)
 #define NS_MAX_SLEEP_AVG	(JIFFIES_TO_NS(MAX_SLEEP_AVG))
--- linux/kernel/sysctl.c.orig
+++ linux/kernel/sysctl.c
@@ -51,6 +51,8 @@
 
 #if defined(CONFIG_SYSCTL)
 
+extern int INTERACTIVE_DELTA;
+
 /* External variables not in a header file. */
 extern int C_A_D;
 extern int sysctl_overcommit_memory;
@@ -275,6 +277,14 @@ static ctl_table kern_table[] = {
 		.proc_handler	= &proc_dointvec,
 	},
 	{
+		.ctl_name	= KERN_PANIC,
+		.procname	= "INTERACTIVE_DELTA",
+		.data		= &INTERACTIVE_DELTA,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= &proc_dointvec,
+	},
+	{
 		.ctl_name	= KERN_CORE_USES_PID,
 		.procname	= "core_uses_pid",
 		.data		= &core_uses_pid,

  reply	other threads:[~2005-05-31 18:53 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-28 14:46 [PROBLEM] Machine Freezes while Running Crossover Office Pekka Enberg
2005-05-29 18:12 ` Linus Torvalds
2005-05-29 18:20   ` Pekka Enberg
2005-05-29 18:49     ` Linus Torvalds
2005-05-29 20:49       ` Pekka Enberg
2005-05-29 22:59         ` Linus Torvalds
2005-05-29 23:06           ` Kyle Moffett
2005-05-30 15:23           ` Pekka Enberg
2005-05-30 17:31             ` Linus Torvalds
2005-05-30 18:07               ` Kyle Moffett
2005-05-30 18:22                 ` Ingo Molnar
2005-05-30 18:22                 ` Linus Torvalds
2005-05-30 18:25                   ` Linus Torvalds
2005-05-30 19:12                     ` Ingo Molnar
2005-05-31 13:54                   ` Greg Stark
2005-05-31  6:15               ` Pekka J Enberg
2005-05-31  6:35               ` Pekka J Enberg
2005-05-31  6:54                 ` Ingo Molnar
2005-05-31 16:53                   ` Pekka Enberg
2005-05-31 17:24                     ` Linus Torvalds
2005-05-31 18:41                       ` Ingo Molnar [this message]
2005-05-31 21:20                         ` Pekka Enberg
2005-06-01  0:07                           ` Con Kolivas
2005-06-01  2:31                             ` David Lang
2005-06-01  7:35                 ` [patch] TASK_NONINTERACTIVE (was: Machine Freezes while Running Crossover Office) Ingo Molnar
2005-06-01  8:42                   ` Pekka J Enberg
2005-06-01  8:55                   ` [patch] " Con Kolivas
2005-06-01 10:26                   ` Pekka J Enberg
2005-06-01 18:06                   ` [patch] " Gene Heskett
2005-06-03  8:34                   ` Pekka J Enberg
2005-06-03 10:57                     ` Ingo Molnar
2005-06-07 13:14                       ` Pekka Enberg
2005-10-17 15:10                   ` [patch] " Pekka Enberg
2005-10-17 15:15                     ` Ingo Molnar

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=20050531184101.GA3175@elte.hu \
    --to=mingo@elte.hu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penberg@cs.helsinki.fi \
    --cc=penberg@gmail.com \
    --cc=torvalds@osdl.org \
    /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