Re: [PATCH] qla2xxx: always allocate qla_tgt_wq
On Thu, 2019-05-09 at 14:58 -0400, Ewan D. Milne wrote: > On Thu, 2019-05-09 at 07:06 -0700, Bart Van Assche wrote: > > On 5/9/19 6:18 AM, Hannes Reinecke wrote: > > > The 'qla_tgt_wq' workqueue is used for generic command aborts, > > > not just target-related functions. So allocate the workqueue > > > always to avoid a kernel crash when aborting commands. > > > > Hi Hannes, > > > > Can the abort code be called directly? This means not queueing the > > abort > > work? Do you perhaps know why the target workqueue is used for > > processing aborts? In other words, can the abort functions be > > modified > > to use one of the system workqueues instead of always allocating > > the > > target workqueue? > > > > Thanks, > > > > Bart. > > How exactly is the qla_tgt_wq used for generic command aborts? > Do you mean initiator mode aborts from the SCSI EH calls? Those look > like they issue mailbox commands to the HBA directly. > Or do we get frames received even if we are not using target mode or > something? Sorry for jumping late onto this thread. The code in question has been introduced by 2f424b9b36ad "qla2xxx: Move atioq to a different lock to reduce lock contention", with the purpose to "ensure that the ATIO queue is empty", for certain controller types, if a ABTS_RECV_24XX element is encountered on the response queue. Maybe Quinn or Himanshu can shed light on the question under which conditions this would happen. Martin
Re: [PATCH v2] scsi: kill useless scsi_use_blk_mq and force_blk_mq
在 09/07/2019 10:06, Jason Yan 写道: ping? On 2019/6/4 21:35, Jason Yan wrote: The legacy path is gone and we do not have to choose mq or not. The module parameter scsi_use_blk_mq and scsi_host_template.force_blk_mq is useless now. Signed-off-by: Jason Yan Reviewed-by: John Garry --- v2: remove force_blk_mq too drivers/scsi/scsi.c | 4 drivers/scsi/scsi_priv.h | 1 - drivers/scsi/scsi_sysfs.c | 8 drivers/scsi/virtio_scsi.c | 1 - include/scsi/scsi_host.h | 3 --- 5 files changed, 17 deletions(-) diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index 653d5ea6c5d9..7049aabb86e0 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -765,10 +765,6 @@ MODULE_LICENSE("GPL"); module_param(scsi_logging_level, int, S_IRUGO|S_IWUSR); MODULE_PARM_DESC(scsi_logging_level, "a bit mask of logging levels"); -/* This should go away in the future, it doesn't do anything anymore */ -bool scsi_use_blk_mq = true; -module_param_named(use_blk_mq, scsi_use_blk_mq, bool, S_IWUSR | S_IRUGO); - static int __init init_scsi(void) { int error; diff --git a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h index 5f21547b2ad2..a4f0741524d8 100644 --- a/drivers/scsi/scsi_priv.h +++ b/drivers/scsi/scsi_priv.h @@ -29,7 +29,6 @@ extern int scsi_init_hosts(void); extern void scsi_exit_hosts(void); /* scsi.c */ -extern bool scsi_use_blk_mq; int scsi_init_sense_cache(struct Scsi_Host *shost); void scsi_init_command(struct scsi_device *dev, struct scsi_cmnd *cmd); #ifdef CONFIG_SCSI_LOGGING diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index dbb206c90ecf..403832ee17e0 100644 --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c @@ -386,15 +386,7 @@ show_host_busy(struct device *dev, struct device_attribute *attr, char *buf) } static DEVICE_ATTR(host_busy, S_IRUGO, show_host_busy, NULL); -static ssize_t -show_use_blk_mq(struct device *dev, struct device_attribute *attr, char *buf) -{ - return sprintf(buf, "1\n"); -} -static DEVICE_ATTR(use_blk_mq, S_IRUGO, show_use_blk_mq, NULL); - static struct attribute *scsi_sysfs_shost_attrs[] = { - &dev_attr_use_blk_mq.attr, &dev_attr_unique_id.attr, &dev_attr_host_busy.attr, &dev_attr_cmd_per_lun.attr, diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index 13f1b3b9923a..f4e3c0310c7d 100644 --- a/drivers/scsi/virtio_scsi.c +++ b/drivers/scsi/virtio_scsi.c @@ -687,7 +687,6 @@ static struct scsi_host_template virtscsi_host_template = { .dma_boundary = UINT_MAX, .map_queues = virtscsi_map_queues, .track_queue_depth = 1, - .force_blk_mq = 1, }; #define virtscsi_config_get(vdev, fld) \ diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index a5fcdad4a03e..2bf56cdb6195 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h @@ -425,9 +425,6 @@ struct scsi_host_template { /* True if the controller does not support WRITE SAME */ unsigned no_write_same:1; - /* True if the low-level driver supports blk-mq only */ - unsigned force_blk_mq:1; - /* * Countdown for host blocking with no commands outstanding. */ .
Re: [PATCH 0/3] zfcp: fixes for the zFCP device driver
On Thu, Jul 11, 2019 at 09:06:08PM -0400, Martin K. Petersen wrote: > > Benjamin, > > > So please consider them for the next cycle. Or should I not have send > > them in that case? Sorry, this step of the process was a bit unclear > > to me. > > A fix is a fix. Applied the series to 5.3/scsi-fixes. Thanks! > Thanks Martin. -- With Best Regards, Benjamin Block / Linux on IBM Z Kernel Development IBM Systems & Technology Group / IBM Deutschland Research & Development GmbH Vorsitz. AufsR.: Matthias Hartmann / Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen / Registergericht: AmtsG Stuttgart, HRB 243294
Re: [PATCH] qla2xxx: always allocate qla_tgt_wq
Hannes, It assumed you're running just Initiator Mode. Our FW should be handling ABTS below us with Initiator Mode. So, we don't expect to see ABTS (ABTS_RECV_24XX) to come to driver with Initiator Mode. Unless something accidentally turns on Target Mode when times to Initialize FW. Initiator side eh_abort goes through a specific IOCB call "Abort IO" that can enter through our Request IOCB Q or Mailbox interface. Abort IO completion would 'NOT' return back to driver as ABTS_RECV_24XX. Regards, Quinn Tran On 7/12/19, 12:01 AM, "linux-scsi-ow...@vger.kernel.org on behalf of Martin Wilck" wrote: On Thu, 2019-05-09 at 14:58 -0400, Ewan D. Milne wrote: > On Thu, 2019-05-09 at 07:06 -0700, Bart Van Assche wrote: > > On 5/9/19 6:18 AM, Hannes Reinecke wrote: > > > The 'qla_tgt_wq' workqueue is used for generic command aborts, > > > not just target-related functions. So allocate the workqueue > > > always to avoid a kernel crash when aborting commands. > > > > Hi Hannes, > > > > Can the abort code be called directly? This means not queueing the > > abort > > work? Do you perhaps know why the target workqueue is used for > > processing aborts? In other words, can the abort functions be > > modified > > to use one of the system workqueues instead of always allocating > > the > > target workqueue? > > > > Thanks, > > > > Bart. > > How exactly is the qla_tgt_wq used for generic command aborts? > Do you mean initiator mode aborts from the SCSI EH calls? Those look > like they issue mailbox commands to the HBA directly. > Or do we get frames received even if we are not using target mode or > something? Sorry for jumping late onto this thread. The code in question has been introduced by 2f424b9b36ad "qla2xxx: Move atioq to a different lock to reduce lock contention", with the purpose to "ensure that the ATIO queue is empty", for certain controller types, if a ABTS_RECV_24XX element is encountered on the response queue. Maybe Quinn or Himanshu can shed light on the question under which conditions this would happen. Martin
Re: [PATCH V6 0/4] Fix zone revalidation memory allocation failures
On 7/11/19 8:05 PM, Jens Axboe wrote: > On 7/7/19 8:02 PM, Damien Le Moal wrote: >> On 2019/07/01 14:09, Damien Le Moal wrote: >>> This series addresses a recuring problem with zone revalidation >>> failures observed during extensive testing with memory constrained >>> system and device hot-plugging. >> >> Jens, Martin, >> >> Any comment regarding this series ? > > LGTM, I'll queue it up for this release. This broke !CONFIG_BLK_DEV_ZONED builds for null_blk, btw. Please be sure to test with zoned enabled and disabled in your builds when changing things that affect both. I fixed it up: http://git.kernel.dk/cgit/linux-block/commit/?h=for-linus&id=e347946439ed70e3af0d0c330b36d5648e71727b -- Jens Axboe
Re: [PATCH V6 0/4] Fix zone revalidation memory allocation failures
On 2019/07/13 0:13, Jens Axboe wrote: > On 7/11/19 8:05 PM, Jens Axboe wrote: >> On 7/7/19 8:02 PM, Damien Le Moal wrote: >>> On 2019/07/01 14:09, Damien Le Moal wrote: This series addresses a recuring problem with zone revalidation failures observed during extensive testing with memory constrained system and device hot-plugging. >>> >>> Jens, Martin, >>> >>> Any comment regarding this series ? >> >> LGTM, I'll queue it up for this release. > > This broke !CONFIG_BLK_DEV_ZONED builds for null_blk, btw. Please be > sure to test with zoned enabled and disabled in your builds when > changing things that affect both. I always check the !CONFIG_BLK_DEV_ZONED case. But clearly I made a mistake somewhere on this one and missed the problem. My apologies for that. > > I fixed it up: > > http://git.kernel.dk/cgit/linux-block/commit/?h=for-linus&id=e347946439ed70e3af0d0c330b36d5648e71727b Thank you for this. -- Damien Le Moal Western Digital Research