aboutsummaryrefslogtreecommitdiff
path: root/drivers/switch
diff options
context:
space:
mode:
authorLai Jiangshan <laijs@cn.fujitsu.com>2014-06-03 15:32:07 +0800
committerMoyster <oysterized@gmail.com>2017-12-05 18:05:35 +0100
commit1373404647fb4b3e9ef10c1cec4b25a0e8718b2a (patch)
tree659faa195133d388d98a00531efc614c4724fdc6 /drivers/switch
parent06668a0ac02852777bed79587ddf0c9109ec760c (diff)
workqueue: remove the empty check in too_many_workers()
The commit ea1abd6197d5 ("workqueue: reimplement idle worker rebinding") used a trick which simply removes all to-be-bound idle workers from the idle list and lets them add themselves back after completing rebinding. And this trick caused the @worker_pool->nr_idle may deviate than the actual number of idle workers on @worker_pool->idle_list. More specifically, nr_idle may be non-zero while ->idle_list is empty. All users of ->nr_idle and ->idle_list are audited. The only affected one is too_many_workers() which is updated to check %false if ->idle_list is empty regardless of ->nr_idle. The commit/trick was complicated due to it just tried to simplify an even more complicated problem (workers had to rebind itself). But the commit a9ab775bcadf ("workqueue: directly restore CPU affinity of workers from CPU_ONLINE") fixed all these problems and the mentioned trick was useless and is gone. So, now the @worker_pool->nr_idle is exactly the actual number of workers on @worker_pool->idle_list. too_many_workers() should recover as it was before the trick. So we remove the empty check. Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/switch')
0 files changed, 0 insertions, 0 deletions