lkml.org 
[lkml]   [2007]   [Oct]   [2]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateTue, 2 Oct 2007 14:15:56 +0200
FromIngo Molnar <>
SubjectRe: Linux 2.6.23-rc9 and a heads-up for the 2.6.24 series..
* Mel Gorman <mel@csn.ul.ie> wrote:

> Dirt. Booting with "profile=sleep,2" is broken in 2.6.23-rc9 and 
> 2.6.23-rc8 but working in 2.6.22. I was checking it out as part of a 
> discussion in another thread and noticed it broken in -mm as well 
> (2.6.23-rc8-mm2). Bisect is in progress but suggestions as to the 
> prime candidates are welcome or preferably, pointing out that I'm an 
> idiot because I missed twiddling some config change.

Mel, does the patch below fix this bug for you? (Note: you will need to 
enable CONFIG_SCHEDSTATS=y too.)

if yes, then Linus please pull this single fix from:

  git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched.git

  | Ingo Molnar (1):
  |      sched: fix profile=sleep
  |
  |  sched_fair.c |   10 ++++++++++
  |  1 file changed, 10 insertions(+)
risk is low: the new code only runs with CONFIG_SCHEDSTATS=y 
(default:off) and profile=sleep (default:off), so it ought to be fairly 
safe to add at this point. (and we had very similar code in v2.6.22 
anyway)

	Ingo

------------------------->
Subject: sched: fix profile=sleep
From: Ingo Molnar <mingo@elte.hu>
fix sleep profiling - we lost this chunk in the CFS merge.

Found-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 kernel/sched_fair.c |   10 ++++++++++
 1 file changed, 10 insertions(+)
Index: linux/kernel/sched_fair.c
===================================================================
--- linux.orig/kernel/sched_fair.c
+++ linux/kernel/sched_fair.c
@@ -639,6 +639,16 @@ static void enqueue_sleeper(struct cfs_r
 
 		se->block_start = 0;
 		se->sum_sleep_runtime += delta;
+
+		/*
+		 * Blocking time is in units of nanosecs, so shift by 20 to
+		 * get a milliseconds-range estimation of the amount of
+		 * time that the task spent sleeping:
+		 */
+		if (unlikely(prof_on == SLEEP_PROFILING)) {
+			profile_hits(SLEEP_PROFILING, (void *)get_wchan(tsk),
+				     delta >> 20);
+		}
 	}
 #endif
 }
-
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/
\
 
 \ /
  Last update: 2007-10-02 14:19    [from the cache]
©2003-2008