Messages in this thread | | | Date | Tue, 13 May 2014 14:08:11 +0800 | From | Lai Jiangshan <> | Subject | Re: [PATCH 02/10 V2] workqueue: destroy_worker() should destroy idle workers only |
| |
On 05/13/2014 05:08 AM, Tejun Heo wrote: > On Mon, May 12, 2014 at 02:56:14PM +0800, Lai Jiangshan wrote: >> @@ -1692,9 +1691,8 @@ static struct worker *alloc_worker(void) >> * create_worker - create a new workqueue worker >> * @pool: pool the new worker will belong to >> * >> - * Create a new worker which is bound to @pool. The returned worker >> - * can be started by calling start_worker() or destroyed using >> - * destroy_worker(). >> + * Create a new worker which is attached to @pool. >> + * The new worker must be started and enter idle via start_worker(). > > Please always fill the comment paragarphs to 75 column or so. Also,
> do we even need start_worker() separate anymore? Maybe we can just > fold alloc_and_create_worker() into alloc_worker()?
We should do this I think. but it is just cleanup, I will do it after this core patchset is accepted.
> >> @@ -1815,6 +1812,7 @@ static int create_and_start_worker(struct worker_pool *pool) >> * @worker: worker to be destroyed >> * >> * Destroy @worker and adjust @pool stats accordingly. >> + * The worker should be idle. > > Ditto about filling. > > Looks good otherwise. > > Thanks. >
| |