Hello,
On Wed, Jul 24, 2019 at 05:59:39PM +0000, Biaoxiang Ye wrote:
> @@ -1441,7 +1444,27 @@ static void __queue_work(int cpu, struct
> workqueue_struct *wq,
> if (worker && worker->current_pwq->wq == wq) {
> pwq = worker->current_pwq;
> } else {
> - /* meh... not running there, queue here */
> + /*
> + * meh... not running there, queue here
> + * we can't break the ordering guarantee of dynamic
> single thread wq,
> + * so have to check whethere the work are still pending
> in last pool or not.
> + */
> + if (wq->flags & __WQ_DYNAMIC) {
> + list_for_each_entry(work_tmp,
> &last_pool->worklist, entry) {
> + if (work_tmp == work) {
> + pending = true;
> + break;
> + }
> + }
> + if (pending) {
> + last_pwq = get_work_pwq(work);
> + if (likely(last_pwq))
> + pwq = last_pwq;
> + else /* queue here */
> + pr_warn("workqueue: work
> pending in last pool, "
> + "but can't get
> pwq.\n");
> + }
> + }
So, I'm not against the idea of making ordered workqueues numa-aware
but this implementation is a bit too ugly. Maybe the cleanest way to
implement this is by synchronizing and ordering the pwqs?
Thanks.
--
tejun
--
You received this message because you are subscribed to the Google Groups
"open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/open-iscsi/20190729192945.GE569612%40devbig004.ftw2.facebook.com.