Sophie

Sophie

distrib > Scientific%20Linux > 5x > i386 > by-pkgid > 351d529f9beeb4e5d936a6d5e3e7813a > files > 2163

kernel-2.6.18-128.29.1.el5.src.rpm

From: Peter Zijlstra <pzijlstr@redhat.com>
Date: Sun, 3 Feb 2008 19:23:46 +0100
Subject: [sched] implement a weak interactivity mode
Message-id: 20080203183340.207722785@chello.nl
O-Subject: [RHEL5.2 PATCH 2/2] sched: implement a weak interactivity mode
Bugzilla: 250589

This implements the new 'weak' interactivity mode by sooner marking the expired
array starved.

Since this is a new 'feature' this might not be appropriate for 5.2 but
still, since its such a small patch I thought I'd propose it anyway :-)

Signed-off-by: Peter Zijlstra <pzijlstr@redhat.com>

Acked-by: Ingo Molnar <mingo@redhat.com>

diff --git a/kernel/sched.c b/kernel/sched.c
index 9452d75..91ae461 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2942,6 +2942,8 @@ static inline int expired_starving(struct rq *rq)
 		return 1;
 	if (!STARVATION_LIMIT || !rq->expired_timestamp)
 		return 0;
+	if (sched_interactive == 1)
+		return 1;
 	if (jiffies - rq->expired_timestamp > STARVATION_LIMIT * rq->nr_running)
 		return 1;
 	return 0;