aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBhaktipriya Shridhar <bhaktipriya96@gmail.com>2016-05-31 12:56:30 -0400
committerDavid Vrabel <david.vrabel@citrix.com>2016-07-06 05:34:49 -0400
commit5ee405d9d234ee5641741c07a654e4c6ba3e2a9d (patch)
tree8c923aa6dcd382694839a72fcfa0245510804e5e
parent429eafe60943bdfa33b15540ab2db5642a1f8c3c (diff)
xen: xenbus: 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 xenbus_frontend_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 the increase of local concurrency shouldn't make any difference. In this case, there is only a single work item, increase of concurrency level by switching to system_wq should not make any difference. Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
-rw-r--r--drivers/xen/xenbus/xenbus_probe_frontend.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/xen/xenbus/xenbus_probe_frontend.c b/drivers/xen/xenbus/xenbus_probe_frontend.c
index bcb53bdc469c..611a23119675 100644
--- a/drivers/xen/xenbus/xenbus_probe_frontend.c
+++ b/drivers/xen/xenbus/xenbus_probe_frontend.c
@@ -31,7 +31,6 @@
31#include "xenbus_probe.h" 31#include "xenbus_probe.h"
32 32
33 33
34static struct workqueue_struct *xenbus_frontend_wq;
35 34
36/* device/<type>/<id> => <type>-<id> */ 35/* device/<type>/<id> => <type>-<id> */
37static int frontend_bus_id(char bus_id[XEN_BUS_ID_SIZE], const char *nodename) 36static int frontend_bus_id(char bus_id[XEN_BUS_ID_SIZE], const char *nodename)
@@ -109,13 +108,7 @@ static int xenbus_frontend_dev_resume(struct device *dev)
109 if (xen_store_domain_type == XS_LOCAL) { 108 if (xen_store_domain_type == XS_LOCAL) {
110 struct xenbus_device *xdev = to_xenbus_device(dev); 109 struct xenbus_device *xdev = to_xenbus_device(dev);
111 110
112 if (!xenbus_frontend_wq) { 111 schedule_work(&xdev->work);
113 pr_err("%s: no workqueue to process delayed resume\n",
114 xdev->nodename);
115 return -EFAULT;
116 }
117
118 queue_work(xenbus_frontend_wq, &xdev->work);
119 112
120 return 0; 113 return 0;
121 } 114 }
@@ -485,12 +478,6 @@ static int __init xenbus_probe_frontend_init(void)
485 478
486 register_xenstore_notifier(&xenstore_notifier); 479 register_xenstore_notifier(&xenstore_notifier);
487 480
488 if (xen_store_domain_type == XS_LOCAL) {
489 xenbus_frontend_wq = create_workqueue("xenbus_frontend");
490 if (!xenbus_frontend_wq)
491 pr_warn("create xenbus frontend workqueue failed, S3 resume is likely to fail\n");
492 }
493
494 return 0; 481 return 0;
495} 482}
496subsys_initcall(xenbus_probe_frontend_init); 483subsys_initcall(xenbus_probe_frontend_init);