linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] O16.2int
@ 2003-08-17 20:37 Benjamin Weber
  2003-08-17 21:47 ` Tom Sightler
  0 siblings, 1 reply; 16+ messages in thread
From: Benjamin Weber @ 2003-08-17 20:37 UTC (permalink / raw)
  To: Con Kolivas; +Cc: Linux Kernel Mailing List

Hi Con

First of all, thanks a lot for all the hard work on the scheduler. A lot
of people are looking forward to 2.6 and your work is a major part of
the desktop user elements of this next kernel generation. 

I am not one of those who can judge much difference from 15 to 16 e.g.
but I do know that not using any of your patches is a major step back in
interactivity and general feeling of responsiveness of my system. Been
using your patches since the 6th iteration. Back then juk (the kde
jukebox thingy) was a major skipping candidate under heavy load, which
nowadays is almost smooth as silk. 

I am pretty sure when 2.6.0 is released on the world your scheduler is
that fine tuned and matured to make the new kernel a must have for
everyone. And you will get there even when you do not work late at night
each day to get the latest improvments to us as fast as possible hehe.
Just to keep you from too many sleepless nights ;)

Until then I will continue applying your patches  as soon as they get
out and look out for anything suspicious that might catch my attention
=)

Keep up the great work!

--
Ben








^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: [PATCH] O16.2int
@ 2003-08-16 11:07 Voluspa
  2003-08-16 14:09 ` Con Kolivas
  0 siblings, 1 reply; 16+ messages in thread
From: Voluspa @ 2003-08-16 11:07 UTC (permalink / raw)
  To: linux-kernel


On 2003-08-16 8:59:48 Con Kolivas wrote:

> Much simpler

For a coder, perhaps. This user however is facing what feels like a
fundamental flaw. The doubling of boot time was fixed, but game-test is
pretty much as it was in pure O16 (impossible) and Blender is equally
bad - now even the mouse pointer vanishes, becomes invisible, during the
10+ second pauses. And it is with Blender as only app running. Didn't
dare to start xmms...

I'll keep running the 2.6.0-test3 ---> O16.2int though. Might pick up
other cases of regression in lighter usage.

Mvh
Mats Johannesson

^ permalink raw reply	[flat|nested] 16+ messages in thread
* [PATCH] O16.2int
@ 2003-08-16  9:02 Con Kolivas
  2003-08-16 13:29 ` Wiktor Wodecki
  2003-08-17  7:40 ` Andrew Morton
  0 siblings, 2 replies; 16+ messages in thread
From: Con Kolivas @ 2003-08-16  9:02 UTC (permalink / raw)
  To: linux kernel mailing list; +Cc: Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 18 bytes --]

Much simpler

Con

[-- Attachment #2: patch-O16.1-O16.2int --]
[-- Type: text/x-diff, Size: 2799 bytes --]

--- linux-2.6.0-test3-mm2-O16/kernel/sched.c	2003-08-16 17:38:49.000000000 +1000
+++ linux-2.6.0-test3-mm2-O16.2/kernel/sched.c	2003-08-16 17:38:28.000000000 +1000
@@ -143,6 +143,9 @@
 #define VARYING_CREDIT(p) \
 	(!(HIGH_CREDIT(p) || LOW_CREDIT(p)))
 
+#define TASK_PREEMPTS_CURR(p, rq) \
+	((p)->prio < (rq)->curr->prio)
+
 /*
  * BASE_TIMESLICE scales user-nice values [ -20 ... 19 ]
  * to time slice values.
@@ -463,24 +466,15 @@ static inline void activate_task(task_t 
 		 * of time they spend on the runqueue, waiting for execution
 		 * on a CPU, first time around:
 		 */
-		if (in_interrupt()){
+		if (in_interrupt())
 			p->activated = 2;
-			p->waker = p;
-		} else {
+		else
 		/*
 		 * Normal first-time wakeups get a credit too for on-runqueue
 		 * time, but it will be weighted down:
 		 */
 			p->activated = 1;
-			p->waker = current;
 		}
-	} else {
-		if (in_interrupt())
-			p->waker = p;
-		else
-			p->waker = current;
-	}
-
 	p->timestamp = now;
 
 	__activate_task(p, rq);
@@ -564,20 +558,6 @@ repeat:
 }
 #endif
 
-static inline int task_preempts_curr(task_t *p, runqueue_t *rq)
-{
-	if (p->prio < rq->curr->prio) {
-			/*
-			 * Prevent a task preempting it's own waker
-			 * to avoid starvation
-			 */
-			if (unlikely(rq->curr == p->waker))
-				return 0;
-			return 1;
-	}
-	return 0;
-}
-
 /***
  * try_to_wake_up - wake up a thread
  * @p: the to-be-woken-up thread
@@ -629,8 +609,9 @@ repeat_lock_task:
 				__activate_task(p, rq);
 			else {
 				activate_task(p, rq);
-				if (task_preempts_curr(p, rq))
-					resched_task(rq->curr);
+				if (TASK_PREEMPTS_CURR(p, rq) &&
+					(in_interrupt() || !p->mm))
+						resched_task(rq->curr);
 			}
 			success = 1;
 		}
@@ -684,7 +665,6 @@ void wake_up_forked_process(task_t * p)
 	p->sleep_avg = JIFFIES_TO_NS(CURRENT_BONUS(p) *
 		CHILD_PENALTY / 100 * MAX_SLEEP_AVG / MAX_BONUS);
 
-	p->waker = p->parent;
 	p->interactive_credit = 0;
 
 	p->prio = effective_prio(p);
@@ -1131,7 +1111,7 @@ static inline void pull_task(runqueue_t 
 	 * Note that idle threads have a prio of MAX_PRIO, for this test
 	 * to be always true for them.
 	 */
-	if (task_preempts_curr(p, this_rq))
+	if (TASK_PREEMPTS_CURR(p, this_rq))
 		set_need_resched();
 }
 
--- linux-2.6.0-test3-mm2-O16/include/linux/sched.h	2003-08-15 15:18:36.000000000 +1000
+++ linux-2.6.0-test3-mm2-O16.2/include/linux/sched.h	2003-08-16 17:39:20.000000000 +1000
@@ -378,7 +378,6 @@ struct task_struct {
 	 */
 	struct task_struct *real_parent; /* real parent process (when being debugged) */
 	struct task_struct *parent;	/* parent process */
-	struct task_struct *waker;	/* waker process */
 	struct list_head children;	/* list of my children */
 	struct list_head sibling;	/* linkage in my parent's children list */
 	struct task_struct *group_leader;

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

end of thread, other threads:[~2003-08-18 23:40 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-17 20:37 [PATCH] O16.2int Benjamin Weber
2003-08-17 21:47 ` Tom Sightler
2003-08-18  1:21   ` Con Kolivas
2003-08-18 16:51     ` Antonio Vargas
2003-08-18 23:47       ` Con Kolivas
  -- strict thread matches above, loose matches on Subject: below --
2003-08-16 11:07 Voluspa
2003-08-16 14:09 ` Con Kolivas
2003-08-16 14:41   ` Nick Piggin
2003-08-16 15:00     ` Con Kolivas
2003-08-16 14:44   ` Voluspa
2003-08-16  9:02 Con Kolivas
2003-08-16 13:29 ` Wiktor Wodecki
2003-08-17  7:40 ` Andrew Morton
2003-08-17  9:30   ` Con Kolivas
2003-08-17 14:59   ` Con Kolivas
2003-08-17 21:06     ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).