diff options
author | Jay Lan <jlan@engr.sgi.com> | 2005-01-11 01:39:41 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-11 01:39:41 -0800 |
commit | 947282e6fefdfd4db0e01fd22711bb019f65db66 (patch) | |
tree | a3ba03f0d41d1ed4edad3748f5541742ca3127dd /kernel | |
parent | b82a839d805ac506e2ef6fb47be7f72e74965f13 (diff) | |
download | history-947282e6fefdfd4db0e01fd22711bb019f65db66.tar.gz |
[PATCH] acct_update_integrals speedup
This patch is to provide extra check in acct_update_integrals() function.
The routine would return if 'delta' is 0 to take quick exit if nothing to
be done.
Signed-off-by: Jay Lan <jlan@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/acct.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/acct.c b/kernel/acct.c index 311ec9c0be533d..32e39accbb86c4 100644 --- a/kernel/acct.c +++ b/kernel/acct.c @@ -541,6 +541,8 @@ void acct_update_integrals(void) if (likely(tsk->mm)) { long delta = tsk->stime - tsk->acct_stimexpd; + if (delta == 0) + return; tsk->acct_stimexpd = tsk->stime; tsk->acct_rss_mem1 += delta * tsk->mm->rss; tsk->acct_vm_mem1 += delta * tsk->mm->total_vm; |