All of lore.kernel.org
 help / color / mirror / Atom feed
From: Con Kolivas <kernel@kolivas.org>
To: Wiktor Wodecki <wodecki@gmx.net>, Wiktor Wodecki <wodecki@gmx.de>,
	Mike Galbraith <efault@gmx.de>
Cc: Nick Piggin <piggin@cyberone.com.au>,
	Davide Libenzi <davidel@xmailserver.org>,
	linux kernel mailing list <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>,
	Felipe Alfaro Solana <felipe_alfaro@linuxmail.org>,
	Zwane Mwaikambo <zwane@arm.linux.org.uk>
Subject: Re: [PATCH] O6int for interactivity
Date: Fri, 18 Jul 2003 20:43:05 +1000	[thread overview]
Message-ID: <200307182043.06029.kernel@kolivas.org> (raw)
In-Reply-To: <20030718103105.GE622@gmx.de>

On Fri, 18 Jul 2003 20:31, Wiktor Wodecki wrote:
> On Fri, Jul 18, 2003 at 12:18:33PM +0200, Mike Galbraith wrote:
> > That _might_ (add salt) be priorities of kernel threads dropping too low.
> >
> > I'm also seeing occasional total stalls under heavy I/O in the order of
> > 10-12 seconds (even the disk stops).  I have no idea if that's something
> > in mm or the scheduler changes though, as I've yet to do any isolation
> > and/or tinkering.  All I know at this point is that I haven't seen it in
> > stock yet.
>
> I've seen this too while doing a huge nfs transfer from a 2.6 machine to
> a 2.4 machine (sparc32). Thought it'd be something with the nfs changes
> which were recently, might be the scheduler, tho. Ah, and it is fully
> reproducable.

Well I didn't want to post this yet because I'm not sure if it's a good 
workaround yet but it looks like a reasonable compromise, and since you have a 
testcase it will be interesting to see if it addresses it. It's possible that 
a task is being requeued every millisecond, and this is a little smarter. It 
allows cpu hogs to run for 100ms before being round robinned, but shorter for 
interactive tasks. Can you try this O7 which applies on top of O6.1 please:

available here:
http://kernel.kolivas.org/2.5

and here:

--- linux-2.6.0-test1-mm1/kernel/sched.c	2003-07-17 19:59:16.000000000 +1000
+++ linux-2.6.0-testck1/kernel/sched.c	2003-07-18 00:10:55.000000000 +1000
@@ -1310,10 +1310,12 @@ void scheduler_tick(int user_ticks, int 
 			enqueue_task(p, rq->expired);
 		} else
 			enqueue_task(p, rq->active);
-	} else if (p->prio < effective_prio(p)){
+	} else if (!((task_timeslice(p) - p->time_slice) %
+		 (MIN_TIMESLICE * (MAX_BONUS + 1 - p->sleep_avg * MAX_BONUS / MAX_SLEEP_AVG)))){
 		/*
-		 * Tasks that have lowered their priority are put to the end
-		 * of the active array with their remaining timeslice
+		 * Running tasks get requeued with their remaining timeslice
+		 * after a period proportional to how cpu intensive they are to
+		 * minimise the duration one interactive task can starve another
 		 */
 		dequeue_task(p, rq->active);
 		set_tsk_need_resched(p);


  reply	other threads:[~2003-07-18 10:25 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-16 14:30 [PATCH] O6int for interactivity Con Kolivas
2003-07-16 15:22 ` Felipe Alfaro Solana
2003-07-16 19:55   ` Marc-Christian Petersen
2003-07-16 17:08 ` Valdis.Kletnieks
2003-07-16 21:59 ` Wiktor Wodecki
2003-07-16 22:30   ` Con Kolivas
2003-07-16 22:12 ` Davide Libenzi
2003-07-17  0:33   ` Con Kolivas
2003-07-17  0:35     ` Davide Libenzi
2003-07-17  1:12       ` Con Kolivas
2003-07-17  0:48     ` Wade
2003-07-17  1:15       ` Con Kolivas
2003-07-17  1:27         ` Eugene Teo
2003-07-17  3:05 ` Wes Janzen
2003-07-17  9:05 ` Alex Riesen
2003-07-17  9:14   ` Con Kolivas
2003-07-18  7:38     ` Alex Riesen
     [not found]       ` <Pine.LNX.4.44.0307251628500.26172-300000@localhost.localdomain>
2003-07-25 19:40         ` Alex Riesen
     [not found] ` <Pine.LNX.4.55.0307161241280.4787@bigblue.dev.mcafeelabs.co m>
2003-07-18  5:38   ` Mike Galbraith
2003-07-18  6:34     ` Nick Piggin
2003-07-18 10:18       ` Mike Galbraith
2003-07-18 10:31         ` Wiktor Wodecki
2003-07-18 10:43           ` Con Kolivas [this message]
2003-07-18 11:34             ` Wiktor Wodecki
2003-07-18 11:38               ` Nick Piggin
2003-07-19 10:59                 ` Wiktor Wodecki
2003-07-18 15:46           ` Mike Galbraith
2003-07-18 16:52             ` Davide Libenzi
2003-07-18 17:05               ` Davide Libenzi
2003-07-18 17:39                 ` Valdis.Kletnieks
2003-07-18 19:31                   ` Davide Libenzi
     [not found]                 ` <Pine.LNX.4.55.0307181038450.5608@bigblue.dev.mcafeelabs.co m>
2003-07-18 20:31                   ` Mike Galbraith
2003-07-18 20:38                     ` Davide Libenzi
     [not found]                 ` <Pine.LNX.4.55.0307181333520.5608@bigblue.dev.mcafeelabs.co m>
2003-07-19 17:04                   ` Mike Galbraith
2003-07-21  0:21                     ` Davide Libenzi
     [not found]                 ` <Pine.LNX.4.55.0307201715130.3548@bigblue.dev.mcafeelabs.co m>
2003-07-21  5:36                   ` Mike Galbraith
2003-07-21 12:39                   ` [NOTAPATCH] " Mike Galbraith
2003-07-21 17:13                     ` Mike Galbraith
2003-07-18 14:24         ` Con Kolivas
2003-07-18 15:50           ` Mike Galbraith
2003-07-18 13:46     ` Davide Libenzi
     [not found] ` <Pine.LNX.4.55.0307180630450.5077@bigblue.dev.mcafeelabs.co m>
2003-07-18 15:41   ` Mike Galbraith
     [not found] ` <Pine.LNX.4.55.0307180951050.5608@bigblue.dev.mcafeelabs.co m>
2003-07-18 18:49   ` Mike Galbraith
2003-07-16 20:20 Shane Shrybman

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=200307182043.06029.kernel@kolivas.org \
    --to=kernel@kolivas.org \
    --cc=akpm@osdl.org \
    --cc=davidel@xmailserver.org \
    --cc=efault@gmx.de \
    --cc=felipe_alfaro@linuxmail.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=piggin@cyberone.com.au \
    --cc=wodecki@gmx.de \
    --cc=wodecki@gmx.net \
    --cc=zwane@arm.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.