From: mel@skynet.ie (Mel Gorman)
To: Ingo Molnar <mingo@elte.hu>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
akpm@linux-foundation.org
Subject: Re: Linux 2.6.23-rc9 and a heads-up for the 2.6.24 series..
Date: Tue, 2 Oct 2007 18:21:35 +0100 [thread overview]
Message-ID: <20071002172135.GA12182@skynet.ie> (raw)
In-Reply-To: <20071002121556.GA22864@elte.hu>
On (02/10/07 14:15), Ingo Molnar didst pronounce:
>
> * 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.)
>
Nice one Ingo - got it first try. The problem commit was
dd41f596cda0d7d6e4a8b139ffdfabcefdd46528 and it's clear that the code removed
in this commit is put back by this latest patch. When applied, profile=sleep
works as long as CONFIG_SCHEDSTAT is set.
Thanks.
> 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>
Tested-by: Mel Gorman <mel@csn.ul.ie>
That said, I am not super-keen on this only working when SCHEDSTAT is set
without telling the user about it. It's not urgent enough to pick up as a
late-late fix but prehaps something like this?
=============
profile=sleep only works if CONFIG_SCHEDSTATS is set. This patch notes the
limitation in Documentation/kernel-parameters.txt and prints a warning at
boot-time if profile=sleep is used without CONFIG_SCHEDSTAT.
Signed-off-by: Mel Gorman <mel@csn.ul.ie>
---
Documentation/kernel-parameters.txt | 3 ++-
kernel/profile.c | 5 +++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff -rup -X /usr/src/patchset-0.6/bin//dontdiff linux-2.6.23-rc9-005_ingo_profile_fix/Documentation/kernel-parameters.txt linux-2.6.23-rc9-010_document_profilesleep/Documentation/kernel-parameters.txt
--- linux-2.6.23-rc9-005_ingo_profile_fix/Documentation/kernel-parameters.txt 2007-10-02 04:24:52.000000000 +0100
+++ linux-2.6.23-rc9-010_document_profilesleep/Documentation/kernel-parameters.txt 2007-10-02 16:43:41.000000000 +0100
@@ -1395,7 +1395,8 @@ and is between 256 and 4096 characters.
Param: "schedule" - profile schedule points.
Param: <number> - step/bucket size as a power of 2 for
statistical time based profiling.
- Param: "sleep" - profile D-state sleeping (millisecs)
+ Param: "sleep" - profile D-state sleeping (millisecs).
+ Requires CONFIG_SCHEDSTATS to work
processor.max_cstate= [HW,ACPI]
Limit processor to maximum C-state
diff -rup -X /usr/src/patchset-0.6/bin//dontdiff linux-2.6.23-rc9-005_ingo_profile_fix/kernel/profile.c linux-2.6.23-rc9-010_document_profilesleep/kernel/profile.c
--- linux-2.6.23-rc9-005_ingo_profile_fix/kernel/profile.c 2007-10-02 04:24:52.000000000 +0100
+++ linux-2.6.23-rc9-010_document_profilesleep/kernel/profile.c 2007-10-02 16:44:50.000000000 +0100
@@ -60,6 +60,7 @@ static int __init profile_setup(char * s
int par;
if (!strncmp(str, sleepstr, strlen(sleepstr))) {
+#ifdef CONFIG_SCHEDSTATS
prof_on = SLEEP_PROFILING;
if (str[strlen(sleepstr)] == ',')
str += strlen(sleepstr) + 1;
@@ -68,6 +69,10 @@ static int __init profile_setup(char * s
printk(KERN_INFO
"kernel sleep profiling enabled (shift: %ld)\n",
prof_shift);
+#else
+ printk(KERN_WARNING
+ "kernel sleep profiling requires CONFIG_SCHEDSTATS\n");
+#endif /* CONFIG_SCHEDSTATS */
} else if (!strncmp(str, schedstr, strlen(schedstr))) {
prof_on = SCHED_PROFILING;
if (str[strlen(schedstr)] == ',')
next prev parent reply other threads:[~2007-10-02 17:21 UTC|newest]
Thread overview: 85+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <alpine.LFD.0.999.0710012029400.3579@woody.linux-foundation.org >
2007-10-02 3:41 ` Linux 2.6.23-rc9 and a heads-up for the 2.6.24 series Linus Torvalds
2007-10-02 9:17 ` Thomas Gleixner
2007-10-02 9:21 ` Andi Kleen
2007-10-02 10:37 ` Jeff Garzik
2007-10-02 10:48 ` Andi Kleen
2007-10-02 11:05 ` Thomas Gleixner
2007-10-02 14:07 ` Ingo Molnar
2007-10-02 14:23 ` Andi Kleen
2007-10-02 14:31 ` Ingo Molnar
2007-10-02 14:54 ` Andi Kleen
2007-10-02 14:58 ` Sam Ravnborg
2007-10-02 15:24 ` Andi Kleen
2007-10-02 15:27 ` Ingo Molnar
2007-10-02 15:30 ` Thomas Gleixner
2007-10-02 15:40 ` Sam Ravnborg
2007-10-02 12:04 ` Jiri Kosina
2007-10-02 20:12 ` Rafael J. Wysocki
2007-10-02 20:11 ` Andrew Morton
2007-10-02 20:31 ` Rafael J. Wysocki
2007-10-02 20:32 ` Roland Dreier
2007-10-03 3:53 ` Eric St-Laurent
2007-10-02 12:07 ` Mel Gorman
2007-10-02 12:15 ` Ingo Molnar
2007-10-02 17:21 ` Mel Gorman [this message]
2007-10-02 22:09 ` Bill Davidsen
2007-10-03 0:37 ` Mel Gorman
2007-10-03 8:21 ` Ingo Molnar
2007-10-03 12:51 ` Mel Gorman
2007-10-22 15:56 ` Ingo Molnar
2007-10-03 8:19 ` Ingo Molnar
2007-10-02 14:44 ` John Stoffel
2007-10-02 15:03 ` Ingo Molnar
2007-10-02 15:45 ` John Stoffel
2007-10-02 22:13 ` Bill Davidsen
2007-10-02 22:44 ` Willy Tarreau
2007-10-02 22:51 ` Alistair John Strachan
2007-10-02 23:00 ` Glauber de Oliveira Costa
2007-10-05 5:41 ` Ingo Molnar
2007-10-05 5:38 ` Ingo Molnar
2007-10-05 6:11 ` Sam Ravnborg
2007-10-05 8:32 ` Thomas Gleixner
2007-10-07 23:44 ` Alistair John Strachan
2007-10-02 23:07 ` Diego Calleja
2007-10-02 23:32 ` Linus Torvalds
2007-10-03 15:28 ` Diego Calleja
2007-10-03 8:46 ` [bug] crash when reading /proc/mounts (was: Re: Linux 2.6.23-rc9 and a heads-up for the 2.6.24 series..) Ingo Molnar
2007-10-03 8:50 ` Ingo Molnar
2007-10-03 9:12 ` Ingo Molnar
2007-10-03 9:23 ` Ingo Molnar
2007-10-03 13:34 ` Al Viro
2007-10-03 14:08 ` Ingo Molnar
2007-10-03 14:26 ` Al Viro
2007-10-03 15:12 ` Arjan van de Ven
2007-10-03 15:11 ` Linus Torvalds
2007-10-03 15:40 ` Ingo Molnar
2007-10-03 16:07 ` Linus Torvalds
2007-10-03 15:47 ` Linus Torvalds
2007-10-03 15:49 ` Ingo Molnar
2007-10-03 16:07 ` Ingo Molnar
2007-10-03 15:51 ` Alan Cox
2007-10-03 16:09 ` Linus Torvalds
2007-10-03 16:25 ` Jan Engelhardt
2007-10-03 17:07 ` Linus Torvalds
2007-10-04 14:12 ` Adrian Bunk
2007-10-04 15:08 ` Alexey Dobriyan
2007-10-03 14:21 ` Linux 2.6.23-rc9 and a heads-up for the 2.6.24 series Timo Jantunen
2007-10-03 19:07 ` Jeff Garzik
2007-10-03 19:25 ` Linus Torvalds
2007-10-04 11:55 ` [patch] net, 9p: build fix with !CONFIG_SYSCTL Ingo Molnar
2007-10-04 17:05 ` [BUG] Linux 2.6.23-rc9 and MAX_ARG_PAGES Mathieu Chouquet-Stringer
2007-10-04 17:17 ` Peter Zijlstra
2007-10-04 20:47 ` Mathieu Chouquet-Stringer
2007-10-04 21:58 ` Mathieu Chouquet-Stringer
2007-10-04 17:27 ` Linus Torvalds
2007-10-04 20:44 ` Mathieu Chouquet-Stringer
2007-10-04 21:21 ` Linus Torvalds
2007-10-04 22:27 ` Paul Mackerras
2007-10-05 0:12 ` Linus Torvalds
2007-10-05 3:22 ` Mathieu Chouquet-Stringer
2007-10-05 7:43 ` Peter Zijlstra
2007-10-04 21:50 ` Chuck Ebbert
2007-10-04 21:54 ` Mathieu Chouquet-Stringer
2007-10-06 8:29 ` Hans-Peter Jansen
2007-10-06 11:29 ` Hans-Peter Jansen
2007-10-06 17:36 ` Bill Davidsen
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=20071002172135.GA12182@skynet.ie \
--to=mel@skynet.ie \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=torvalds@linux-foundation.org \
/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.