diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2012-01-07 07:44:37 -0500 |
|---|---|---|
| committer | Arnd Bergmann <arnd@arndb.de> | 2012-01-07 15:40:51 -0500 |
| commit | b001befe58691ef3627458cd814e8cee7f845c5f (patch) | |
| tree | 1083f1a1cd3feeceeac4b395534df0ff032fdbc8 /net/sunrpc/sched.c | |
| parent | 31b2a868451d630bacfdeddc626371b3f9d9a01c (diff) | |
| parent | 928a11ba36f999436915ea2b1eadf54301f93059 (diff) | |
Merge branch 'samsung/dt' into next/dt
* samsung/dt: (3 commit)
Merge branch 'depends/rmk/for-linus' into samsung/dt
Merge branch 'depends/rmk/restart' into next/cleanup
Merge branch 'next/cleanup' into samsung/dt
Conflicts:
arch/arm/mach-tegra/board-dt.c
arch/arm/mach-tegra/include/mach/entry-macro.S
The latest version of the samsung/dt branch resolves
all sorts of conflicts with the latest upstream, no functional
changes that are not already there.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'net/sunrpc/sched.c')
| -rw-r--r-- | net/sunrpc/sched.c | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index d12ffa54581..00a1a2acd58 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c | |||
| @@ -590,6 +590,27 @@ void rpc_prepare_task(struct rpc_task *task) | |||
| 590 | task->tk_ops->rpc_call_prepare(task, task->tk_calldata); | 590 | task->tk_ops->rpc_call_prepare(task, task->tk_calldata); |
| 591 | } | 591 | } |
| 592 | 592 | ||
| 593 | static void | ||
| 594 | rpc_init_task_statistics(struct rpc_task *task) | ||
| 595 | { | ||
| 596 | /* Initialize retry counters */ | ||
| 597 | task->tk_garb_retry = 2; | ||
| 598 | task->tk_cred_retry = 2; | ||
| 599 | task->tk_rebind_retry = 2; | ||
| 600 | |||
| 601 | /* starting timestamp */ | ||
| 602 | task->tk_start = ktime_get(); | ||
| 603 | } | ||
| 604 | |||
| 605 | static void | ||
| 606 | rpc_reset_task_statistics(struct rpc_task *task) | ||
| 607 | { | ||
| 608 | task->tk_timeouts = 0; | ||
| 609 | task->tk_flags &= ~(RPC_CALL_MAJORSEEN|RPC_TASK_KILLED|RPC_TASK_SENT); | ||
| 610 | |||
| 611 | rpc_init_task_statistics(task); | ||
| 612 | } | ||
| 613 | |||
| 593 | /* | 614 | /* |
| 594 | * Helper that calls task->tk_ops->rpc_call_done if it exists | 615 | * Helper that calls task->tk_ops->rpc_call_done if it exists |
| 595 | */ | 616 | */ |
| @@ -602,6 +623,7 @@ void rpc_exit_task(struct rpc_task *task) | |||
| 602 | WARN_ON(RPC_ASSASSINATED(task)); | 623 | WARN_ON(RPC_ASSASSINATED(task)); |
| 603 | /* Always release the RPC slot and buffer memory */ | 624 | /* Always release the RPC slot and buffer memory */ |
| 604 | xprt_release(task); | 625 | xprt_release(task); |
| 626 | rpc_reset_task_statistics(task); | ||
| 605 | } | 627 | } |
| 606 | } | 628 | } |
| 607 | } | 629 | } |
| @@ -804,11 +826,6 @@ static void rpc_init_task(struct rpc_task *task, const struct rpc_task_setup *ta | |||
| 804 | task->tk_calldata = task_setup_data->callback_data; | 826 | task->tk_calldata = task_setup_data->callback_data; |
| 805 | INIT_LIST_HEAD(&task->tk_task); | 827 | INIT_LIST_HEAD(&task->tk_task); |
| 806 | 828 | ||
| 807 | /* Initialize retry counters */ | ||
| 808 | task->tk_garb_retry = 2; | ||
| 809 | task->tk_cred_retry = 2; | ||
| 810 | task->tk_rebind_retry = 2; | ||
| 811 | |||
| 812 | task->tk_priority = task_setup_data->priority - RPC_PRIORITY_LOW; | 829 | task->tk_priority = task_setup_data->priority - RPC_PRIORITY_LOW; |
| 813 | task->tk_owner = current->tgid; | 830 | task->tk_owner = current->tgid; |
| 814 | 831 | ||
| @@ -818,8 +835,7 @@ static void rpc_init_task(struct rpc_task *task, const struct rpc_task_setup *ta | |||
| 818 | if (task->tk_ops->rpc_call_prepare != NULL) | 835 | if (task->tk_ops->rpc_call_prepare != NULL) |
| 819 | task->tk_action = rpc_prepare_task; | 836 | task->tk_action = rpc_prepare_task; |
| 820 | 837 | ||
| 821 | /* starting timestamp */ | 838 | rpc_init_task_statistics(task); |
| 822 | task->tk_start = ktime_get(); | ||
| 823 | 839 | ||
| 824 | dprintk("RPC: new task initialized, procpid %u\n", | 840 | dprintk("RPC: new task initialized, procpid %u\n", |
| 825 | task_pid_nr(current)); | 841 | task_pid_nr(current)); |
