On Mon, May 5, 2014 at 11:02 PM, Tejun Heo <t...@kernel.org> wrote: > On Sun, Apr 27, 2014 at 12:08:58PM +0800, Lai Jiangshan wrote: >> /** >> + * worker_unbind_pool() - unbind the worker from the pool >> + * @worker: worker which is bound to its pool >> + * >> + * Undo the pool-binding which had been done in create_worker() >> + */ >> +static void worker_unbind_pool(struct worker *worker) > > worker_unbind_from_pool() would be a better name but I don't think > using bind/unbind for this purpose is a good idea. We already use > that pair of verbs for workers/pools being bound and unbound to CPUs. > I don't think we want to overload the terms for this purpose. It gets > pretty confusing. How about something like worker_detach_from_pool() > and later worker_attach_to_pool()?
I considered several names (searching from an English dictionary) assoc/pin/bind/attach/add... The last I chose the winner "bind" from the last two candidates assoc&bind. worker_OP[_to]_pool() OP(assoc/pin/bind/attach/add) the worker to OP_list of the pool, do cpu-binding for the worker OP_list the list in the pool for the workers, iterating(when cpu-binding and worker concurrency [un]bound) OP_entry worker entry for OP_list, for iterating(when cpu-binding and worker concurrency [un]bound) OP_mutex protects worker_OP_to_pool() protect cpu-binding for the workers, protect iterating(when cpu-binding and worker concurrency [un]bound) every sentence has "bind", so I think "bind_mutex" is proper. since I used "bind_mutex", I will use bind_list and worker_bind_pool(). I don't refuse to use worker_attach_to_pool(), but I hope you choose other names for me: attach_list VS bind_list attach_mutex VS bind_mutex I guess they will be attach_list&attach_mutex. it's a little pity to drop the nice name bind_mutex. Thanks, Lai > > Thanks. > > -- > tejun > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/