Re: Linux 2.6.23-rc9 and a heads-up for the 2.6.24 series..

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Mel Gorman <[email protected]> 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 <[email protected]>

fix sleep profiling - we lost this chunk in the CFS merge.

Found-by: Mel Gorman <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
---
 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux