Commit 947282e6 authored by Jay Lan's avatar Jay Lan Committed by Linus Torvalds

[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: default avatarJay Lan <jlan@sgi.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b82a839d
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment