[lkml]   [2003]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: [PATCH] remove useless MOD_{INC,DEC}_USE_COUNT from sunrpc
On Sun, May 04, 2003 at 08:46:47PM +0200, Trond Myklebust wrote:
> > What do you thing about something like the following to wait on
> > the thread in module_exit()?
> I don't understand. That is still an interruptible wait, so how would
> that help?

It doesn't :) Sorry, the code should use wait_even(), the
_interruptible was a pasto..

> What is wrong with just assuming that the rpciod() thread might need
> to run independently of the calling module for a short period of time
> in order to kill/clean up the pending tasks?

That's fine and the patch doesn't change anything about the assumption.
If just changes how to make sure the sunrpc module can't be unloaded
during that period. Previously you incremented the usecount and now
we're waiting for the thread to finish in module_exit().

--- 1.10/include/linux/sunrpc/sched.h Sun Jan 12 16:40:13 2003
+++ edited/include/linux/sunrpc/sched.h Sun May 4 19:08:09 2003
@@ -188,6 +188,7 @@
int rpciod_up(void);
void rpciod_down(void);
void rpciod_wake_up(void);
+void wait_on_rpciod(void);
#ifdef RPC_DEBUG
void rpc_show_tasks(void);
--- 1.24/net/sunrpc/sched.c Thu Mar 27 12:42:11 2003
+++ edited/net/sunrpc/sched.c Sun May 4 19:07:42 2003
@@ -1097,6 +1092,12 @@
spin_unlock_irqrestore(&current->sighand->siglock, flags);
+ wait_event(&rpciod_killer, !rpciod_pid);

#ifdef RPC_DEBUG
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at
 \ /
  Last update: 2005-03-22 13:35    [W:0.062 / U:1.792 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site