patch-2.1.80 linux/net/sunrpc/sched.c
Next file: linux/net/sunrpc/svcsock.c
Previous file: linux/net/netsyms.c
Back to the patch index
Back to the overall index
- Lines: 77
- Date:
Mon Jan 19 13:57:37 1998
- Orig file:
v2.1.79/linux/net/sunrpc/sched.c
- Orig date:
Mon Jan 12 22:09:26 1998
diff -u --recursive --new-file v2.1.79/linux/net/sunrpc/sched.c linux/net/sunrpc/sched.c
@@ -46,6 +46,11 @@
static struct rpc_wait_queue childq = RPC_INIT_WAITQ("childq");
/*
+ * RPC tasks sit here while waiting for conditions to improve.
+ */
+static struct rpc_wait_queue delay_queue = RPC_INIT_WAITQ("delayq");
+
+/*
* All RPC tasks are linked into this list
*/
static struct rpc_task * all_tasks = NULL;
@@ -318,8 +323,6 @@
void
rpc_delay(struct rpc_task *task, unsigned long delay)
{
- static struct rpc_wait_queue delay_queue;
-
task->tk_timeout = delay;
rpc_sleep_on(&delay_queue, task, NULL, __rpc_atrun);
}
@@ -440,10 +443,15 @@
static int executing = 0;
int incr = RPC_IS_ASYNC(task)? 1 : 0;
- if (incr && (executing || rpc_inhibit)) {
- printk("RPC: rpc_execute called recursively!\n");
- return;
+ if (incr) {
+ if (rpc_inhibit) {
+ printk("RPC: execution inhibited!\n");
+ return;
+ }
+ if (executing)
+ printk("RPC: %d tasks executed\n", executing);
}
+
executing += incr;
__rpc_execute(task);
executing -= incr;
@@ -712,6 +720,7 @@
save_flags(oldflags); cli();
rpc_make_runnable(child);
restore_flags(oldflags);
+ /* N.B. Is it possible for the child to have already finished? */
rpc_sleep_on(&childq, task, func, NULL);
}
@@ -725,6 +734,7 @@
struct rpc_task **q, *rovr;
dprintk("RPC: killing all tasks for client %p\n", clnt);
+ /* N.B. Why bother to inhibit? Nothing blocks here ... */
rpc_inhibit++;
for (q = &all_tasks; (rovr = *q); q = &rovr->tk_next_task) {
if (!clnt || rovr->tk_client == clnt) {
@@ -917,14 +927,16 @@
if (!t)
return;
- printk("-pid- proc flgs status -client- --rqstp- -timeout "
+ printk("-pid- proc flgs status -client- -prog- --rqstp- -timeout "
"-rpcwait -action- --exit--\n");
for (; t; t = next) {
next = t->tk_next_task;
- printk("%05d %04d %04x %06d %8p %8p %08ld %8p %8p %8p\n",
+ printk("%05d %04d %04x %06d %8p %6d %8p %08ld %8s %8p %8p\n",
t->tk_pid, t->tk_proc, t->tk_flags, t->tk_status,
- t->tk_client, t->tk_rqstp, t->tk_timeout,
- t->tk_rpcwait, t->tk_action, t->tk_exit);
+ t->tk_client, t->tk_client->cl_prog,
+ t->tk_rqstp, t->tk_timeout,
+ t->tk_rpcwait ? rpc_qname(t->tk_rpcwait) : " <NULL> ",
+ t->tk_action, t->tk_exit);
if (!(t->tk_flags & RPC_TASK_NFSWRITE))
continue;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov