Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 32916
b: refs/heads/master
c: 163ecdf
h: refs/heads/master
v: v3
  • Loading branch information
Shailabh Nagar authored and Linus Torvalds committed Jul 31, 2006
1 parent 7fed566 commit 05b8fdb
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d94a041519f3ab1ac023bf917619cd8c4a7d3c01
refs/heads/master: 163ecdff060f2fa9e8f5238882fd0137493556a6
10 changes: 6 additions & 4 deletions trunk/Documentation/accounting/delay-accounting.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions trunk/Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -448,8 +448,6 @@ running once the system is up.
Format: <area>[,<node>]
See also Documentation/networking/decnet.txt.

delayacct [KNL] Enable per-task delay accounting

dhash_entries= [KNL]
Set number of hash buckets for dentry cache.

Expand Down Expand Up @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions trunk/include/linux/delayacct.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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);
}
Expand Down
8 changes: 4 additions & 4 deletions trunk/kernel/delayacct.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
#include <linux/sysctl.h>
#include <linux/delayacct.h>

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)
{
Expand Down

0 comments on commit 05b8fdb

Please sign in to comment.