History

workqueue: Remove the advanced kicking of the idle workers in rebind_workers()

The commit 6d25be5782e4 ("sched/core, workqueues: Distangle worker accounting from rq lock") changed the schedule callbacks for workqueue and removed the local-wake-up functionality. Now the wakingup of workers is done by normal fashion and workers not yet migrated to the specific CPU in concurrency managed pool can also be woken up by workers that already bound to the specific cpu now. So this advanced kicking of the idle workers to migrate them to the associated CPU is unneeded now.

Lai Jiangshan committed 4 years ago

Commit 3e5f39e1 parent ccf45151 file · +0 −11Browse files

Showing the changes to kernel/workqueue.c (1 of 1 file). Show all

Unified · Split

kernel/workqueue.c+0−11
@@ -5057,17 +5057,6 @@ static void rebind_workers(struct worker_pool *pool) · 5056 unmodified lines
50575057 for_each_pool_worker(worker, pool) {
50585058 unsigned int worker_flags = worker->flags;
50595059
5060− /*
5061− * A bound idle worker should actually be on the runqueue
5062− * of the associated CPU for local wake-ups targeting it to
5063− * work. Kick all idle workers so that they migrate to the
5064− * associated CPU. Doing this in the same loop as
5065− * replacing UNBOUND with REBOUND is safe as no worker will
5066− * be bound before @pool->lock is released.
5067− */
5068− if (worker_flags & WORKER_IDLE)
5069− wake_up_process(worker->task);
5070−
50715060 /*
50725061 * We want to clear UNBOUND but can't directly call
50735062 * worker_clr_flags() or adjust nr_running. Atomically