aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMel Gorman <mel@csn.ul.ie>2007-10-24 12:23:50 -0400
committerIngo Molnar <mingo@elte.hu>2007-10-24 12:23:50 -0400
commitb3da2a73ff5a2953a4ad8ebbf0aa7e6965ff9de2 (patch)
tree43583e5f492a48c56f9537006c8f806d570b0d84
parent838225b48edc971620cbeb292034dabd2b0d7d1d (diff)
sched: document profile=sleep requiring CONFIG_SCHEDSTATS
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>
-rw-r--r--Documentation/kernel-parameters.txt3
-rw-r--r--kernel/profile.c5
2 files changed, 7 insertions, 1 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index a13d69b2217d..8ae5fac08dfa 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1444,7 +1444,8 @@ and is between 256 and 4096 characters. It is defined in the file
1444 Param: "schedule" - profile schedule points. 1444 Param: "schedule" - profile schedule points.
1445 Param: <number> - step/bucket size as a power of 2 for 1445 Param: <number> - step/bucket size as a power of 2 for
1446 statistical time based profiling. 1446 statistical time based profiling.
1447 Param: "sleep" - profile D-state sleeping (millisecs) 1447 Param: "sleep" - profile D-state sleeping (millisecs).
1448 Requires CONFIG_SCHEDSTATS
1448 Param: "kvm" - profile VM exits. 1449 Param: "kvm" - profile VM exits.
1449 1450
1450 processor.max_cstate= [HW,ACPI] 1451 processor.max_cstate= [HW,ACPI]
diff --git a/kernel/profile.c b/kernel/profile.c
index 631b75c25d7e..5e95330e5120 100644
--- a/kernel/profile.c
+++ b/kernel/profile.c
@@ -60,6 +60,7 @@ static int __init profile_setup(char * str)
60 int par; 60 int par;
61 61
62 if (!strncmp(str, sleepstr, strlen(sleepstr))) { 62 if (!strncmp(str, sleepstr, strlen(sleepstr))) {
63#ifdef CONFIG_SCHEDSTATS
63 prof_on = SLEEP_PROFILING; 64 prof_on = SLEEP_PROFILING;
64 if (str[strlen(sleepstr)] == ',') 65 if (str[strlen(sleepstr)] == ',')
65 str += strlen(sleepstr) + 1; 66 str += strlen(sleepstr) + 1;
@@ -68,6 +69,10 @@ static int __init profile_setup(char * str)
68 printk(KERN_INFO 69 printk(KERN_INFO
69 "kernel sleep profiling enabled (shift: %ld)\n", 70 "kernel sleep profiling enabled (shift: %ld)\n",
70 prof_shift); 71 prof_shift);
72#else
73 printk(KERN_WARNING
74 "kernel sleep profiling requires CONFIG_SCHEDSTATS\n");
75#endif /* CONFIG_SCHEDSTATS */
71 } else if (!strncmp(str, schedstr, strlen(schedstr))) { 76 } else if (!strncmp(str, schedstr, strlen(schedstr))) {
72 prof_on = SCHED_PROFILING; 77 prof_on = SCHED_PROFILING;
73 if (str[strlen(schedstr)] == ',') 78 if (str[strlen(schedstr)] == ',')