[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20071218171039.GA5908@infradead.org>
Date: Tue, 18 Dec 2007 17:10:39 +0000
From: Christoph Hellwig <hch@...radead.org>
To: Jeff Layton <jlayton@...hat.com>
Cc: linux-nfs@...r.kernel.org, nfsv4@...ux-nfs.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/7] SUNRPC: make new svc_create_kthread function
> +int
> +svc_create_kthread(svc_thread_fn func, struct svc_rqst *rqstp)
> +{
> + struct svc_serv *serv = rqstp->rq_server;
> + struct task_struct *task;
> +
> + task = kthread_create((int (*)(void *)) func, rqstp, serv->sv_name);
> + if (IS_ERR(task))
> + return PTR_ERR(task);
> +
> + if (serv->sv_nrpools > 1)
> + svc_pool_map_set_cpumask(task, rqstp->rq_pool->sp_id, NULL);
> +
> + svc_sock_update_bufs(serv);
> + wake_up_process(task);
> + return 0;
I don't think we'll need this helper at all. For the normal case of
not using a pool the caller can just call svc_sock_update_bufs even
before creating the thread, and the just use kthread_run. That'll also
get rid of all this horrible casting things around for the thread entry
point function pointer.
--
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