Commit b3da2a73ff5a2953a4ad8ebbf0aa7e6965ff9de2

Authored by Mel Gorman
Committed by Ingo Molnar
1 parent 838225b48e

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>

Showing 2 changed files with 7 additions and 1 deletions Side-by-side Diff

Documentation/kernel-parameters.txt
... ... @@ -1444,7 +1444,8 @@
1444 1444 Param: "schedule" - profile schedule points.
1445 1445 Param: <number> - step/bucket size as a power of 2 for
1446 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 1449 Param: "kvm" - profile VM exits.
1449 1450  
1450 1451 processor.max_cstate= [HW,ACPI]
... ... @@ -60,6 +60,7 @@
60 60 int par;
61 61  
62 62 if (!strncmp(str, sleepstr, strlen(sleepstr))) {
  63 +#ifdef CONFIG_SCHEDSTATS
63 64 prof_on = SLEEP_PROFILING;
64 65 if (str[strlen(sleepstr)] == ',')
65 66 str += strlen(sleepstr) + 1;
... ... @@ -68,6 +69,10 @@
68 69 printk(KERN_INFO
69 70 "kernel sleep profiling enabled (shift: %ld)\n",
70 71 prof_shift);
  72 +#else
  73 + printk(KERN_WARNING
  74 + "kernel sleep profiling requires CONFIG_SCHEDSTATS\n");
  75 +#endif /* CONFIG_SCHEDSTATS */
71 76 } else if (!strncmp(str, schedstr, strlen(schedstr))) {
72 77 prof_on = SCHED_PROFILING;
73 78 if (str[strlen(schedstr)] == ',')