]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen: xen-pciback: Remove create_workqueue
authorBhaktipriya Shridhar <bhaktipriya96@gmail.com>
Wed, 1 Jun 2016 14:15:08 +0000 (19:45 +0530)
committerBob Liu <bob.liu@oracle.com>
Thu, 20 Oct 2016 07:57:16 +0000 (03:57 -0400)
commita3f95a385b418611901d2bf9facd05e0a1452d82
treefa33827ce1deb50f7201ba00fda216f26a9f7fb3
parente456d89334af5266e437270884f7a0542ac0f91f
xen: xen-pciback: Remove create_workqueue

System workqueues have been able to handle high level of concurrency
for a long time now and there's no reason to use dedicated workqueues
just to gain concurrency.  Replace dedicated xen_pcibk_wq with the
use of system_wq.

Unlike a dedicated per-cpu workqueue created with create_workqueue(),
system_wq allows multiple work items to overlap executions even on
the same CPU; however, a per-cpu workqueue doesn't have any CPU
locality or global ordering guarantees unless the target CPU is
explicitly specified and thus the increase of local concurrency shouldn't
make any difference.

Since the work items could be pending, flush_work() has been used in
xen_pcibk_disconnect(). xen_pcibk_xenbus_remove() calls free_pdev()
which in turn calls xen_pcibk_disconnect() for every pdev to ensure that
there is no pending task while disconnecting the driver.

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
(cherry picked from commit 429eafe60943bdfa33b15540ab2db5642a1f8c3c)
Signed-off-by: Bob Liu <bob.liu@oracle.com>
Orabug: 24820937
drivers/xen/xen-pciback/pciback.h
drivers/xen/xen-pciback/pciback_ops.c
drivers/xen/xen-pciback/xenbus.c