[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20060825135824.GA10659@infradead.org>
Date: Fri, 25 Aug 2006 14:58:24 +0100
From: Christoph Hellwig <hch@...radead.org>
To: Cedric Le Goater <clg@...ibm.com>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Neil Brown <neilb@...e.de>, nfs@...ts.sourceforge.net
Subject: Re: [NFS] kthread: update lockd to use kthread
> host->h_nsmstate = newstate;
> if (!host->h_reclaiming++) {
> + struct task_struct* task;
> +
> nlm_get_host(host);
> __module_get(THIS_MODULE);
> - if (kernel_thread(reclaimer, host, CLONE_KERNEL) < 0)
> + task = kthread_run(reclaimer, host, "%s-reclaim", host->h_name);
> + if (IS_ERR(task))
> module_put(THIS_MODULE);
Folks, this kind of patches is really useless. If I wanted to just replace
kernel_thread() with kthread_run() I could do it myself in a day or two.
The whole point of the kthread API is that we now have a coherent set
of functions that deal with all aspects of kernel thread handling. And
a conversion to that always involves rething the whole way a driver
uses kernel threads, and that's a good thing because most users were
buggy or at least rather odd.
sunrpc is not an exception to that, the thread handling is very interesting,
including things like using signals for various things possibly not waiting
for threads to exit.
If you don't feel like poking into all these nasty internal leave the
conversation to someone else, preferably a nfs developer.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists