diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2011-12-21 15:59:45 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2011-12-21 15:59:45 -0500 |
commit | b00f4dc5ff022cb9cbaffd376d9454d7fa1e496f (patch) | |
tree | 40f1b232e2f1e8ac365317a14fdcbcb331722b46 /net/sunrpc/sched.c | |
parent | 1eac8111e0763853266a171ce11214da3a347a0a (diff) | |
parent | b9e26dfdad5a4f9cbdaacafac6998614cc9c41bc (diff) |
Merge branch 'master' into pm-sleep
* master: (848 commits)
SELinux: Fix RCU deref check warning in sel_netport_insert()
binary_sysctl(): fix memory leak
mm/vmalloc.c: remove static declaration of va from __get_vm_area_node
ipmi_watchdog: restore settings when BMC reset
oom: fix integer overflow of points in oom_badness
memcg: keep root group unchanged if creation fails
nilfs2: potential integer overflow in nilfs_ioctl_clean_segments()
nilfs2: unbreak compat ioctl
cpusets: stall when updating mems_allowed for mempolicy or disjoint nodemask
evm: prevent racing during tfm allocation
evm: key must be set once during initialization
mmc: vub300: fix type of firmware_rom_wait_states module parameter
Revert "mmc: enable runtime PM by default"
mmc: sdhci: remove "state" argument from sdhci_suspend_host
x86, dumpstack: Fix code bytes breakage due to missing KERN_CONT
IB/qib: Correct sense on freectxts increment and decrement
RDMA/cma: Verify private data length
cgroups: fix a css_set not found bug in cgroup_attach_proc
oprofile: Fix uninitialized memory access when writing to writing to oprofilefs
Revert "xen/pv-on-hvm kexec: add xs_reset_watches to shutdown watches from old kernel"
...
Conflicts:
kernel/cgroup_freezer.c
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 5317b9341b53..3341d8962786 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c | |||
@@ -591,6 +591,27 @@ void rpc_prepare_task(struct rpc_task *task) | |||
591 | task->tk_ops->rpc_call_prepare(task, task->tk_calldata); | 591 | task->tk_ops->rpc_call_prepare(task, task->tk_calldata); |
592 | } | 592 | } |
593 | 593 | ||
594 | static void | ||
595 | rpc_init_task_statistics(struct rpc_task *task) | ||
596 | { | ||
597 | /* Initialize retry counters */ | ||
598 | task->tk_garb_retry = 2; | ||
599 | task->tk_cred_retry = 2; | ||
600 | task->tk_rebind_retry = 2; | ||
601 | |||
602 | /* starting timestamp */ | ||
603 | task->tk_start = ktime_get(); | ||
604 | } | ||
605 | |||
606 | static void | ||
607 | rpc_reset_task_statistics(struct rpc_task *task) | ||
608 | { | ||
609 | task->tk_timeouts = 0; | ||
610 | task->tk_flags &= ~(RPC_CALL_MAJORSEEN|RPC_TASK_KILLED|RPC_TASK_SENT); | ||
611 | |||
612 | rpc_init_task_statistics(task); | ||
613 | } | ||
614 | |||
594 | /* | 615 | /* |
595 | * Helper that calls task->tk_ops->rpc_call_done if it exists | 616 | * Helper that calls task->tk_ops->rpc_call_done if it exists |
596 | */ | 617 | */ |
@@ -603,6 +624,7 @@ void rpc_exit_task(struct rpc_task *task) | |||
603 | WARN_ON(RPC_ASSASSINATED(task)); | 624 | WARN_ON(RPC_ASSASSINATED(task)); |
604 | /* Always release the RPC slot and buffer memory */ | 625 | /* Always release the RPC slot and buffer memory */ |
605 | xprt_release(task); | 626 | xprt_release(task); |
627 | rpc_reset_task_statistics(task); | ||
606 | } | 628 | } |
607 | } | 629 | } |
608 | } | 630 | } |
@@ -805,11 +827,6 @@ static void rpc_init_task(struct rpc_task *task, const struct rpc_task_setup *ta | |||
805 | task->tk_calldata = task_setup_data->callback_data; | 827 | task->tk_calldata = task_setup_data->callback_data; |
806 | INIT_LIST_HEAD(&task->tk_task); | 828 | INIT_LIST_HEAD(&task->tk_task); |
807 | 829 | ||
808 | /* Initialize retry counters */ | ||
809 | task->tk_garb_retry = 2; | ||
810 | task->tk_cred_retry = 2; | ||
811 | task->tk_rebind_retry = 2; | ||
812 | |||
813 | task->tk_priority = task_setup_data->priority - RPC_PRIORITY_LOW; | 830 | task->tk_priority = task_setup_data->priority - RPC_PRIORITY_LOW; |
814 | task->tk_owner = current->tgid; | 831 | task->tk_owner = current->tgid; |
815 | 832 | ||
@@ -819,8 +836,7 @@ static void rpc_init_task(struct rpc_task *task, const struct rpc_task_setup *ta | |||
819 | if (task->tk_ops->rpc_call_prepare != NULL) | 836 | if (task->tk_ops->rpc_call_prepare != NULL) |
820 | task->tk_action = rpc_prepare_task; | 837 | task->tk_action = rpc_prepare_task; |
821 | 838 | ||
822 | /* starting timestamp */ | 839 | rpc_init_task_statistics(task); |
823 | task->tk_start = ktime_get(); | ||
824 | 840 | ||
825 | dprintk("RPC: new task initialized, procpid %u\n", | 841 | dprintk("RPC: new task initialized, procpid %u\n", |
826 | task_pid_nr(current)); | 842 | task_pid_nr(current)); |