Re: [PATCHSET] workqueue: remove gcwq and make worker_pool the onlybackend abstraction
From: Tejun Heo
Date: Thu Jan 24 2013 - 13:50:56 EST
Hey, Lai.
On Thu, Jan 24, 2013 at 09:36:39PM +0800, Lai Jiangshan wrote:
> For the whole patchset
> Reviewed-by: Lai Jiangshan <laijs@xxxxxxxxxxxxxx>
Thanks for reviewing it.
> The only concern: get_work_pool() may slow down __queue_work().
Yeap, I'm currently working on to optimize idr so that the fast path
basically comes down to
if (id < FIRST_LAYER_LIMIT)
return idr->first_layer[id];
> I think we can save the pool->id at work_struct->entry.next, It will
> simply the code a little.
Hmm... I'm not sure whether saving id somewhere else would make any
noticeable difference. Decoding ->id probalby comes down to a couple
bit shuffling instructions.
> More aggressive, we can save the work_pool
> pointer at work_struct->entry.next, it will simply more code and
> __queue_work() will not be slowed down. (It is the user's
> responsibility not to modify work_struct if the user want to pass it
> to workqueue API later)
We probably can't store pointers to pools directly because custom
pools will need to be dynamically created and destroyed.
Thanks.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/