diff --git a/Documentation/accounting/delay-accounting.txt b/Documentation/accounting/delay-accounting.txt index be215e58423b8068ac79b7f44561222195b8a3a0..1443cd71d2631241f13286e544296ef286d91c90 100644 --- a/Documentation/accounting/delay-accounting.txt +++ b/Documentation/accounting/delay-accounting.txt @@ -64,11 +64,13 @@ Compile the kernel with CONFIG_TASK_DELAY_ACCT=y CONFIG_TASKSTATS=y -Enable the accounting at boot time by adding -the following to the kernel boot options - delayacct +Delay accounting is enabled by default at boot up. +To disable, add + nodelayacct +to the kernel boot options. The rest of the instructions +below assume this has not been done. -and after the system has booted up, use a utility +After the system has booted up, use a utility similar to getdelays.c to access the delays seen by a given task or a task group (tgid). The utility also allows a given command to be diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index e11f7728ec6f0691b940daa3d2ec5c7b182417fc..b50595a0550f7d45d46358c2156e10154e9ed67c 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -448,8 +448,6 @@ running once the system is up. Format: [,] See also Documentation/networking/decnet.txt. - delayacct [KNL] Enable per-task delay accounting - dhash_entries= [KNL] Set number of hash buckets for dentry cache. @@ -1031,6 +1029,8 @@ running once the system is up. nocache [ARM] + nodelayacct [KNL] Disable per-task delay accounting + nodisconnect [HW,SCSI,M68K] Disables SCSI disconnects. noexec [IA-64] diff --git a/include/linux/delayacct.h b/include/linux/delayacct.h index 8a284cc6fd5ffd810c2f58bfd17c66e7b6e5db1f..11487b6e7127ff68ec12cada74c672af72efcffb 100644 --- a/include/linux/delayacct.h +++ b/include/linux/delayacct.h @@ -55,7 +55,7 @@ static inline void delayacct_tsk_init(struct task_struct *tsk) { /* reinitialize in case parent's non-null pointer was dup'ed*/ tsk->delays = NULL; - if (unlikely(delayacct_on)) + if (delayacct_on) __delayacct_tsk_init(tsk); } @@ -80,7 +80,7 @@ static inline void delayacct_blkio_end(void) static inline int delayacct_add_tsk(struct taskstats *d, struct task_struct *tsk) { - if (likely(!delayacct_on) || !tsk->delays) + if (!delayacct_on || !tsk->delays) return 0; return __delayacct_add_tsk(d, tsk); } diff --git a/kernel/delayacct.c b/kernel/delayacct.c index f05392d64267eafddf4d86a8c99a62233782b7fa..57ca3730205d75f0734ac7ad418d85cced3025ef 100644 --- a/kernel/delayacct.c +++ b/kernel/delayacct.c @@ -19,15 +19,15 @@ #include #include -int delayacct_on __read_mostly; /* Delay accounting turned on/off */ +int delayacct_on __read_mostly = 1; /* Delay accounting turned on/off */ kmem_cache_t *delayacct_cache; -static int __init delayacct_setup_enable(char *str) +static int __init delayacct_setup_disable(char *str) { - delayacct_on = 1; + delayacct_on = 0; return 1; } -__setup("delayacct", delayacct_setup_enable); +__setup("nodelayacct", delayacct_setup_disable); void delayacct_init(void) {