]> err.no Git - linux-2.6/commitdiff
sched: document profile=sleep requiring CONFIG_SCHEDSTATS
authorMel Gorman <mel@csn.ul.ie>
Wed, 24 Oct 2007 16:23:50 +0000 (18:23 +0200)
committerIngo Molnar <mingo@elte.hu>
Wed, 24 Oct 2007 16:23:50 +0000 (18:23 +0200)
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>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Documentation/kernel-parameters.txt
kernel/profile.c

index a13d69b2217ddad09c1f8948dcad4a0ce6fc6170..8ae5fac08dfa54087880678867698aea3bea96b9 100644 (file)
@@ -1444,7 +1444,8 @@ and is between 256 and 4096 characters. It is defined in the file
                        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
                        Param: "kvm" - profile VM exits.
 
        processor.max_cstate=   [HW,ACPI]
index 631b75c25d7ed40c9a38b4e52244f58f4436d74b..5e95330e51207c48a043b2675b1d015d48d0f488 100644 (file)
@@ -60,6 +60,7 @@ static int __init profile_setup(char * str)
        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 * str)
                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)] == ',')