diff options
author | Mandeep Singh Baines <msb@google.com> | 2009-02-06 15:37:47 -0800 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-09 11:03:49 +0100 |
commit | 17406b82d621930cca8ccc1272cdac9a7dae8e40 (patch) | |
tree | 224c8b0b7c78a5467175fe10e116bdc6b73495ea /kernel/fork.c | |
parent | 94be52dc075a32af4aa73d7e10f68734d62d6af2 (diff) | |
download | talos-op-linux-17406b82d621930cca8ccc1272cdac9a7dae8e40.tar.gz talos-op-linux-17406b82d621930cca8ccc1272cdac9a7dae8e40.zip |
softlockup: remove timestamp checking from hung_task
Impact: saves sizeof(long) bytes per task_struct
By guaranteeing that sysctl_hung_task_timeout_secs have elapsed between
tasklist scans we can avoid using timestamps.
Signed-off-by: Mandeep Singh Baines <msb@google.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index fb9444282836..bf582f75014b 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -639,6 +639,9 @@ static int copy_mm(unsigned long clone_flags, struct task_struct * tsk) tsk->min_flt = tsk->maj_flt = 0; tsk->nvcsw = tsk->nivcsw = 0; +#ifdef CONFIG_DETECT_HUNG_TASK + tsk->last_switch_count = tsk->nvcsw + tsk->nivcsw; +#endif tsk->mm = NULL; tsk->active_mm = NULL; @@ -1041,11 +1044,6 @@ static struct task_struct *copy_process(unsigned long clone_flags, p->default_timer_slack_ns = current->timer_slack_ns; -#ifdef CONFIG_DETECT_HUNG_TASK - p->last_switch_count = 0; - p->last_switch_timestamp = 0; -#endif - task_io_accounting_init(&p->ioac); acct_clear_integrals(p); |