On 6/30/20 10:07 PM, Bob Liu wrote: > So that scsi_wq_xxx and scsi_tmf_xxx can be bind to different cpu to get better > isolation. > > This patch unfolded create_singlethread_workqueue(), added WQ_SYSFS and dropped > __WQ_ORDERED_EXPLICIT since __WQ_ORDERED_EXPLICIT workqueue isn't allowed to > change "cpumask". > > Signed-off-by: Bob Liu <bob.liu@xxxxxxxxxx> > --- > drivers/scsi/hosts.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c > index 7ec91c3..37d1c55 100644 > --- a/drivers/scsi/hosts.c > +++ b/drivers/scsi/hosts.c > @@ -272,8 +272,10 @@ int scsi_add_host_with_dma(struct Scsi_Host *shost, struct device *dev, > if (shost->transportt->create_work_queue) { > snprintf(shost->work_q_name, sizeof(shost->work_q_name), > "scsi_wq_%d", shost->host_no); > - shost->work_q = create_singlethread_workqueue( > - shost->work_q_name); > + shost->work_q = alloc_workqueue("%s", > + WQ_SYSFS | __WQ_LEGACY | WQ_MEM_RECLAIM | WQ_UNBOUND, > + 1, shost->work_q_name); > + > if (!shost->work_q) { > error = -EINVAL; > goto out_free_shost_data; > @@ -487,7 +489,7 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize) > } > > shost->tmf_work_q = alloc_workqueue("scsi_tmf_%d", > - WQ_UNBOUND | WQ_MEM_RECLAIM, > + WQ_UNBOUND | WQ_MEM_RECLAIM | WQ_SYSFS, > 1, shost->host_no); > if (!shost->tmf_work_q) { > shost_printk(KERN_WARNING, shost, > Reviewed-by: Mike Christie <michael.christie@xxxxxxxxxx>