[PATCH 4/7] blk-mq: Avoid that request processing stalls when sharing tags

2017-11-30 Thread Bart Van Assche
blk_mq_sched_mark_restart_hctx() must be called before blk_mq_dispatch_rq_list() is called. Make sure that BLK_MQ_S_SCHED_RESTART is set before any blk_mq_dispatch_rq_list() call occurs. Fixes: commit b347689ffbca ("blk-mq-sched: improve dispatching from sw queue") Signed-off-by: Bart

[PATCH 5/7] blk-mq: Avoid that blk_mq_mark_tag_wait() triggers a queue stall

2017-11-30 Thread Bart Van Assche
The blk_mq_sched_restart() call from inside blk_mq_free_request() only runs those queues for which BLK_MQ_S_SCHED_RESTART has been set. Hence set that flag from inside blk_mq_mark_tag_wait() whether or not a queue is shared. Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> Cc: Mi

[PATCH 0/7] blk-mq: Queue running fixes

2017-11-30 Thread Bart Van Assche
Hello Jens, This patch series fixes the issues I came across while reviewing and testing the v4.15-rc1 block layer. Please consider these patches for v4.15-rc / v4.16 as appropriate. Thanks, Bart. Bart Van Assche (7): blk-mq: Fix spelling in a source code comment block: Document more

[PATCH 3/7] blk-mq: Make blk_mq_mark_tag_wait() easier to read

2017-11-30 Thread Bart Van Assche
tch does not change any functionality. Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> Cc: Christoph Hellwig <h...@lst.de> Cc: Omar Sandoval <osan...@fb.com> Cc: Hannes Reinecke <h...@suse.de> Cc: Johannes Thumshirn <jthumsh...@sus

[PATCH 1/7] blk-mq: Fix spelling in a source code comment

2017-11-30 Thread Bart Van Assche
Change "nedeing" into "needing" and "caes" into "cases". Fixes: commit f906a6a0f426 ("blk-mq: improve tag waiting setup for non-shared tags") Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> Cc: Christoph Hellwig <h...@lst.de

[PATCH 2/7] block: Document more locking requirements

2017-11-30 Thread Bart Van Assche
This patch does not change any functionality. Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> Cc: Christoph Hellwig <h...@lst.de> Cc: Hannes Reinecke <h...@suse.de> Cc: Johannes Thumshirn <jthumsh...@suse.de> --- block/blk-mq.c | 13 +++-- block/b

Re: [PATCH 00/11] fs: use freeze_fs on suspend/hibernate

2017-11-30 Thread Bart Van Assche
On Thu, 2017-11-30 at 20:42 +0100, Luis R. Rodriguez wrote: > On Thu, Nov 30, 2017 at 05:01:13PM +0000, Bart Van Assche wrote: > > The md resync > > thread must be stopped before a system is frozen. Today the md driver uses > > the kthread freezing mechanism for that purpos

Re: [PATCH 00/11] fs: use freeze_fs on suspend/hibernate

2017-11-30 Thread Bart Van Assche
On Wed, 2017-11-29 at 15:23 -0800, Luis R. Rodriguez wrote: > This is a followup from the original RFC which proposed to start > to kill kthread freezing all together [0]. Instead of going straight > out to the jugular for kthread freezing this series only addresses > killing freezer calls on

Re: [PATCH] block: fix a comment typo in req_opf

2017-11-27 Thread Bart Van Assche
On Fri, 2017-11-24 at 23:26 +0900, Minwoo Im wrote: > a tiny comment typo fixed. Patch descriptions should use the imperative mood. Anyway: Reviewed-by: Bart Van Assche <bart.vanass...@wdc.com>

Re: [PATCH V2 1/5] dm-mpath: don't call blk_mq_delay_run_hw_queue() in case of BLK_STS_RESOURCE

2017-11-27 Thread Bart Van Assche
On Mon, 2017-11-27 at 13:07 +0800, Ming Lei wrote: > If .queue_rq() returns BLK_STS_RESOURCE, blk-mq will rerun the queue in > the three situations: > > 1) if BLK_MQ_S_SCHED_RESTART is set > - queue is rerun after one rq is completed, see blk_mq_sched_restart() > which is run from

Re: [PATCH] block: drain queue before waiting for q_usage_counter becoming zero

2017-11-22 Thread Bart Van Assche
On Wed, 2017-11-22 at 13:11 +0800, Ming Lei wrote: > diff --git a/block/blk-mq.c b/block/blk-mq.c > index 11097477eeab..3d3797327491 100644 > --- a/block/blk-mq.c > +++ b/block/blk-mq.c > @@ -161,6 +161,8 @@ void blk_freeze_queue(struct request_queue *q) >* exported to drivers as the only

Re: 4.14: WARNING: CPU: 4 PID: 2895 at block/blk-mq.c:1144 with virtio-blk

2017-11-20 Thread Bart Van Assche
On Fri, 2017-11-17 at 15:42 +0100, Christian Borntraeger wrote: > This is > > b7a71e66d (Jens Axboe2017-08-01 09:28:24 -0600 1141) * > are mapped to it. > b7a71e66d (Jens Axboe2017-08-01 09:28:24 -0600 1142) */ > 6a83e74d2 (Bart Van Ass

Re: [PATCH] bio: ensure __bio_clone_fast copies bi_partno

2017-11-17 Thread Bart Van Assche
On Thu, 2017-11-16 at 23:47 -0800, Michael Lyle wrote: > diff --git a/block/bio.c b/block/bio.c > index 101c2a9b5481..33fa6b4af312 100644 > --- a/block/bio.c > +++ b/block/bio.c > @@ -597,6 +597,7 @@ void __bio_clone_fast(struct bio *bio, struct bio > *bio_src) >* so we don't set nor

Re: [PATCH v3 2/8] crypto: scompress - use sgl_alloc() and sgl_free()

2017-11-10 Thread Bart Van Assche
On Fri, 2017-11-03 at 15:23 -0700, Bart Van Assche wrote: > Use the sgl_alloc() and sgl_free() functions instead of open coding > these functions. > > Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> > Cc: Ard Biesheuvel <ard.biesheu...@linaro.org

Re: [PATCH] blk-mq: respect queue dead via blk_mq_quiesce_queue

2017-11-10 Thread Bart Van Assche
On Sun, 2017-11-05 at 15:38 +, Bart Van Assche wrote: > On Sun, 2017-11-05 at 20:10 +0800, Ming Lei wrote: > > diff --git a/block/blk-core.c b/block/blk-core.c > > index 048be4aa6024..0b121f29e3b1 100644 > > --- a/block/blk-core.c > > +++ b/block/blk-core.c &g

Re: [PATCH] blk-mq: fix issue with shared tag queue re-running

2017-11-09 Thread Bart Van Assche
On Thu, 2017-11-09 at 09:32 -0700, Jens Axboe wrote: > It's been running happily for > 1 hour now, no issues observed. The same null_blk test runs fine on my setup. But what's weird is that if I run the srp-test software that I again see a lockup in sd_probe_async(). That happens not only with

[PATCH v12 6/7] block, scsi: Make SCSI quiesce and resume work reliably

2017-11-09 Thread Bart Van Assche
ng ..." >>hibernate-test-log.txt systemctl hibernate sleep 10 kill "${pids[@]}" echo idle > /sys/block/md0/md/sync_action wait echo "$(date) Done." >>hibernate-test-log.txt done Reported-by: Oleksandr Natalenko <oleksa...@natalenko.name

[PATCH v12 5/7] block: Add the QUEUE_FLAG_PREEMPT_ONLY request queue flag

2017-11-09 Thread Bart Van Assche
This flag will be used in the next patch to let the block layer core know whether or not a SCSI request queue has been quiesced. A quiesced SCSI queue namely only processes RQF_PREEMPT requests. Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> Reviewed-by: Hannes Reinecke <h...

[PATCH v12 4/7] ide, scsi: Tell the block layer at request allocation time about preempt requests

2017-11-09 Thread Bart Van Assche
Convert blk_get_request(q, op, __GFP_RECLAIM) into blk_get_request_flags(q, op, BLK_MQ_PREEMPT). This patch does not change any functionality. Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> Tested-by: Martin Steigerwald <mar...@lichtvoll.de> Acked-by: David S. Miller <da..

[PATCH v12 2/7] block: Introduce blk_get_request_flags()

2017-11-09 Thread Bart Van Assche
A side effect of this patch is that the GFP mask that is passed to several allocation functions in the legacy block layer is changed from GFP_KERNEL into __GFP_DIRECT_RECLAIM. Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Teste

[PATCH v12 7/7] block, nvme: Introduce blk_mq_req_flags_t

2017-11-09 Thread Bart Van Assche
functionality. Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Tested-by: Oleksandr Natalenko <oleksa...@natalenko.name> Cc: linux-n...@lists.infradead.org Cc: Christoph Hellwig <h...@lst.de> Cc: Johannes Thumshirn <jthum

[PATCH v12 0/7] block, scsi: Improve suspend and resume

2017-11-09 Thread Bart Van Assche
in this patch series. Changes between v2 and v3: - Made md kernel threads freezable. - Changed the approach for quiescing SCSI devices again. - Addressed Ming's review comments. Changes compared to v1 of this patch series: - Changed the approach and rewrote the patch series. Bart Van Assche (6

[PATCH v12 3/7] block: Introduce BLK_MQ_REQ_PREEMPT

2017-11-09 Thread Bart Van Assche
Set RQF_PREEMPT if BLK_MQ_REQ_PREEMPT is passed to blk_get_request_flags(). Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Tested-by: Martin Steigerwald <mar...@lichtvoll.de> Tested-by: Oleksandr Natalenko <oleksa.

[PATCH v12 1/7] block: Make q_usage_counter also track legacy requests

2017-11-09 Thread Bart Van Assche
ed a comment and made sure REQ_NOWAIT is handled properly in blk_old_get_request() ] Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by: Hannes Reinecke <h...@suse.c

Re: [PATCH v11 0/7] block, scsi, md: Improve suspend and resume

2017-11-09 Thread Bart Van Assche
On Thu, 2017-11-09 at 07:16 +0100, Oleksandr Natalenko wrote: > is this something known to you, or it is just my fault applying this series > to > v4.13? Except having this warning, suspend/resume works for me: > > [ 27.383846] sd 0:0:0:0: [sda] Starting disk > [ 27.383976] sd 1:0:0:0:

Re: [PATCH] blk-mq: fix issue with shared tag queue re-running

2017-11-08 Thread Bart Van Assche
tps://www.mail-archive.com/linux-scsi@vger.kernel.org/msg68190.html): Reviewed-by: Bart Van Assche <bart.vanass...@wdc.com> Tested-by: Bart Van Assche <bart.vanass...@wdc.com>

[PATCH] blk-mq: Avoid that request queue removal can trigger list corruption

2017-11-08 Thread Bart Van Assche
660 worker_thread+0x3d/0x3b0 kthread+0x129/0x140 ret_from_fork+0x27/0x40 Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> Cc: Christoph Hellwig <h...@lst.de> Cc: Hannes Reinecke <h...@suse.com> Cc: Johannes Thumshirn <jthumsh...@suse.de> --- block/blk-core.c | 1 +

Re: [PATCH] SCSI: don't get target/host busy_count in scsi_mq_get_budget()

2017-11-08 Thread Bart Van Assche
On Tue, 2017-11-07 at 20:06 -0700, Jens Axboe wrote: > At this point, I have no idea what Bart's setup looks like. Bart, it > would be REALLY helpful if you could tell us how you are reproducing > your hang. I don't know why this has to be dragged out. Hello Jens, It is a disappointment to me

Re: [PATCH V2] scsi_debugfs: fix crash in scsi_show_rq()

2017-11-07 Thread Bart Van Assche
On Wed, 2017-11-08 at 08:59 +0800, Ming Lei wrote: > On Tue, Nov 07, 2017 at 04:13:48PM +0000, Bart Van Assche wrote: > > On Tue, 2017-11-07 at 23:21 +0800, Ming Lei wrote: > > > diff --git a/drivers/scsi/scsi_debugfs.c b/drivers/scsi/scsi_debugfs.c > > > index 5e9755

Re: [PATCH] SCSI: don't get target/host busy_count in scsi_mq_get_budget()

2017-11-07 Thread Bart Van Assche
On Tue, 2017-11-07 at 15:06 -0700, Jens Axboe wrote: > Just to keep everyone in the loop, this bug is not new to > for-4.15/block, nor is it new to the current 4.41-rc or 4.13. So it's > probably different to what Bart is hitting, but it's a bug none the > less... Hello Jens, There are several

Re: [PATCH] SCSI: don't get target/host busy_count in scsi_mq_get_budget()

2017-11-07 Thread Bart Van Assche
On Tue, 2017-11-07 at 09:29 -0700, Jens Axboe wrote: > On 11/07/2017 09:20 AM, Bart Van Assche wrote: > > On Tue, 2017-11-07 at 10:11 +0800, Ming Lei wrote: > > > If you can reproduce, please provide me at least the following log > > > first: > > > > > &

Re: [PATCH] SCSI: don't get target/host busy_count in scsi_mq_get_budget()

2017-11-07 Thread Bart Van Assche
On Tue, 2017-11-07 at 10:11 +0800, Ming Lei wrote: > If you can reproduce, please provide me at least the following log > first: > > find /sys/kernel/debug/block -name tags | xargs cat | grep busy > > If any pending requests arn't completed, please provide the related > info in dbgfs about

Re: [PATCH] SCSI: don't get target/host busy_count in scsi_mq_get_budget()

2017-11-07 Thread Bart Van Assche
On Tue, 2017-11-07 at 18:15 +0800, Ming Lei wrote: > Last time, you didn't mention the target patch for setting its > can_queue as 1, so I think you can't reproduce the issue on upstream > kernel without out-of-tree patch. Then looks it is another issue, > and we are making progress actually. If

Re: [PATCH V2] scsi_debugfs: fix crash in scsi_show_rq()

2017-11-07 Thread Bart Van Assche
On Tue, 2017-11-07 at 23:21 +0800, Ming Lei wrote: > cmd->cmnd can be allocated/freed dynamically in case of > T10_PI_TYPE2_PROTECTION, > so we can't access it in scsi_show_rq() if 'SCpnt->cmnd != scsi_req(rq)->cmd', > because this request can be freed any time. That description is inaccurate.

Re: [PATCH 1/1] [RFC] blk-mq: fix queue stalling on shared hctx restart

2017-11-07 Thread Bart Van Assche
d since I also have been able to verify that this patch fixes that stall: Reviewed-by: Bart Van Assche <bart.vanass...@wdc.com> Tested-by: Bart Van Assche <bart.vanass...@wdc.com>

[PATCH] blk-mq: Revert multiple recent patches

2017-11-06 Thread Bart Van Assche
ure in .get_budget SCSI: don't get target/host busy_count in scsi_mq_get_budget() blk-mq: don't restart queue when .get_budget returns BLK_STS_RESOURCE blk-mq: don't handle TAG_SHARED in restart scsi: implement .get_budget and .put_budget for blk-mq Signed-off-by: Bart Van Assche <bart.vanass..

Re: [PATCH] SCSI: don't get target/host busy_count in scsi_mq_get_budget()

2017-11-06 Thread Bart Van Assche
On Sat, 2017-11-04 at 08:19 -0600, Jens Axboe wrote: > On 11/03/2017 07:55 PM, Ming Lei wrote: > > It is very expensive to atomic_inc/atomic_dec the host wide counter of > > host->busy_count, and it should have been avoided via blk-mq's mechanism > > of getting driver tag, which uses the more

Re: [PATCH] SCSI: don't get target/host busy_count in scsi_mq_get_budget()

2017-11-06 Thread Bart Van Assche
atch more than reducing the probability that the race is encountered that a queue is added to "starved_list" after all requests have finished? > Fixes: 0df21c86bdbf(scsi: implement .get_budget and .put_budget for blk-mq) > Reported-by: Bart Van Assche <bart.vanass...@wdc.com>

Re: [PATCH] blk-mq: quiesce queue during switching io sched and updating nr_requests

2017-11-06 Thread Bart Van Assche
On Mon, 2017-11-06 at 18:43 +0800, Ming Lei wrote: > @@ -2665,6 +2665,7 @@ int blk_mq_update_nr_requests(struct request_queue *q, > unsigned int nr) > return -EINVAL; > > blk_mq_freeze_queue(q); > + blk_mq_quiesce_queue(q); > > ret = 0; >

Re: [PATCH] blk-mq: respect queue dead via blk_mq_quiesce_queue

2017-11-06 Thread Bart Van Assche
On Mon, 2017-11-06 at 11:44 +0800, Ming Lei wrote: > On Sun, Nov 05, 2017 at 03:38:49PM +0000, Bart Van Assche wrote: > > On Sun, 2017-11-05 at 20:10 +0800, Ming Lei wrote: > > > diff --git a/block/blk-core.c b/block/blk-core.c > > > index 048be4aa6024..0b121f29e3b1 1

Re: [PATCH] blk-mq: respect queue dead via blk_mq_quiesce_queue

2017-11-05 Thread Bart Van Assche
On Sun, 2017-11-05 at 20:10 +0800, Ming Lei wrote: > diff --git a/block/blk-core.c b/block/blk-core.c > index 048be4aa6024..0b121f29e3b1 100644 > --- a/block/blk-core.c > +++ b/block/blk-core.c > @@ -658,6 +658,10 @@ void blk_cleanup_queue(struct request_queue *q) >

[PATCH v3 3/8] nvmet/fc: Use sgl_alloc() and sgl_free()

2017-11-03 Thread Bart Van Assche
Use the sgl_alloc() and sgl_free() functions instead of open coding these functions. Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by: Hannes Reinecke <h...@suse.com> Cc: Keith Busch <keith.bu...@int

[PATCH v3 0/8] Introduce sgl_alloc() and sgl_free()

2017-11-03 Thread Bart Van Assche
for the sgl_alloc*() functions such that the (pointer to) the output argument comes last. Thanks, Bart. Bart Van Assche (8): lib/scatterlist: Introduce sgl_alloc() and sgl_free() crypto: scompress - use sgl_alloc() and sgl_free() nvmet/fc: Use sgl_alloc() and sgl_free() nvmet/rdma: Use sgl_alloc

[PATCH v3 1/8] lib/scatterlist: Introduce sgl_alloc() and sgl_free()

2017-11-03 Thread Bart Van Assche
if CONFIG_SGL_ALLOC=y to avoid that the kernel size increases if this functionality is not used. Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> --- include/linux/scatterlist.

[PATCH v3 8/8] scsi/pmcraid: Use sgl_alloc_order() and sgl_free_order()

2017-11-03 Thread Bart Van Assche
Use the sgl_alloc_order() and sgl_free_order() functions instead of open coding these functions. Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> Cc: linux-s...@vger.kernel.org Cc: Martin K. Petersen <martin.peter...@oracl

[PATCH v3 7/8] scsi/pmcraid: Remove an unused structure member

2017-11-03 Thread Bart Van Assche
Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> Cc: linux-s...@vger.kernel.org Cc: Martin K. Petersen <martin.peter...@oracle.com> Cc: Anil Ravindranath <anil_ravindran...@pmc-sierra.com> --- drivers/scsi/pmcraid

[PATCH v3 6/8] scsi/ipr: Use sgl_alloc_order() and sgl_free_order()

2017-11-03 Thread Bart Van Assche
Use the sgl_alloc_order() and sgl_free_order() functions instead of open coding these functions. Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> Acked-by: Brian King <brk...@linux.vnet.ibm.com> Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by:

[PATCH v3 4/8] nvmet/rdma: Use sgl_alloc() and sgl_free()

2017-11-03 Thread Bart Van Assche
Use the sgl_alloc() and sgl_free() functions instead of open coding these functions. Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by: Hannes Reinecke <h...@suse.com> Cc: Keith Busch <keith.bu...@int

[PATCH v3 2/8] crypto: scompress - use sgl_alloc() and sgl_free()

2017-11-03 Thread Bart Van Assche
Use the sgl_alloc() and sgl_free() functions instead of open coding these functions. Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> Cc: Ard Biesheuvel <ard.biesheu...@linaro.org> Cc: Herbert Xu <herb...@gondor.apana.org.au> --- crypto/Kconfig | 1 + crypt

[PATCH v3 5/8] target: Use sgl_alloc_order() and sgl_free()

2017-11-03 Thread Bart Van Assche
Use the sgl_alloc_order() and sgl_free() functions instead of open coding these functions. Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> Cc: Nicholas A. Bellinger <n...@linux-iscsi.org> Cc: Christoph Hellwig <h...@lst.de> Cc: Hannes Reinecke <h...@suse.com&

Re: [PATCH v2] blk-mq: Make blk_mq_get_request() error path less confusing

2017-11-03 Thread Bart Van Assche
On Mon, 2017-10-16 at 16:32 -0700, Bart Van Assche wrote: > blk_mq_get_tag() can modify data->ctx. This means that in the > error path of blk_mq_get_request() data->ctx should be passed to > blk_mq_put_ctx() instead of local_ctx. Note: since blk_mq_put_ctx() > ignores its argumen

Re: [PATCH V2 0/2] block: remove unnecessary RESTART

2017-11-03 Thread Bart Van Assche
On Fri, 2017-11-03 at 23:47 +0800, Ming Lei wrote: > Forget to mention, there is failure when running 'make' under srp-test > because shellcheck package is missed in RHEL7. Can that be the issue > of test failure? If yes, could you provide a special version of srp-test > which doesn't depend on

Re: [PATCH V2 0/2] block: remove unnecessary RESTART

2017-11-03 Thread Bart Van Assche
On Fri, 2017-11-03 at 23:18 +0800, Ming Lei wrote: > BTW, Laurence found there is kernel crash in his IB/SRP test when running > for-next branch of block tree, so we just test v4.14-rc4 w/wo my blk-mq > patches. One fix for a *sporadic* initiator crash has been queued for the v4.15 merge window.

Re: [PATCH V2 0/2] block: remove unnecessary RESTART

2017-11-03 Thread Bart Van Assche
On Fri, 2017-11-03 at 23:18 +0800, Ming Lei wrote: > Subject: [PATCH] SCSI_MQ: fix IO hang in case of queue busy > > We have to insert the rq back before checking .device_busy, > otherwise When IO completes just after the check and before > this req is added to hctx->dispatch, this queue may

Re: [PATCH V2 0/2] block: remove unnecessary RESTART

2017-11-03 Thread Bart Van Assche
On Fri, 2017-11-03 at 11:50 +0800, Ming Lei wrote: > On Fri, Nov 03, 2017 at 02:42:50AM +0000, Bart Van Assche wrote: > > On Fri, 2017-11-03 at 10:12 +0800, Ming Lei wrote: > > > [root@ibclient srp-test]# ./run_tests > > > modprobe: FATAL: Module target_core_mod i

Re: [PATCH V2 0/2] block: remove unnecessary RESTART

2017-11-02 Thread Bart Van Assche
On Fri, 2017-11-03 at 10:12 +0800, Ming Lei wrote: > [root@ibclient srp-test]# ./run_tests > modprobe: FATAL: Module target_core_mod is in use. LIO must be unloaded before srp-test software is started. Bart.

Re: [PATCH V2 0/2] block: remove unnecessary RESTART

2017-11-02 Thread Bart Van Assche
On Fri, 2017-11-03 at 08:15 +0800, Ming Lei wrote: > On Thu, Nov 02, 2017 at 11:54:57PM +0000, Bart Van Assche wrote: > > On Fri, 2017-11-03 at 07:48 +0800, Ming Lei wrote: > > > Could you please share your srp-tests script? I may find a IB/SRP system > > > to see if

Re: [PATCH V2 0/2] block: remove unnecessary RESTART

2017-11-02 Thread Bart Van Assche
On Fri, 2017-11-03 at 07:48 +0800, Ming Lei wrote: > Could you please share your srp-tests script? I may find a IB/SRP system > to see if I can reproduce this issue and figure out one solution. Please have a look at https://github.com/bvanassche/srp-test. Bart.

Re: [PATCH V2 0/2] block: remove unnecessary RESTART

2017-11-02 Thread Bart Van Assche
On Fri, 2017-11-03 at 07:38 +0800, Ming Lei wrote: > On Thu, Nov 02, 2017 at 03:57:05PM +0000, Bart Van Assche wrote: > > On Wed, 2017-11-01 at 08:21 -0600, Jens Axboe wrote: > > > Fixed that up, and applied these two patches as well. > > > > Hello Jens, > >

Re: [PATCH V2 0/2] block: remove unnecessary RESTART

2017-11-02 Thread Bart Van Assche
On Wed, 2017-11-01 at 08:21 -0600, Jens Axboe wrote: > Fixed that up, and applied these two patches as well. Hello Jens, Recently I noticed that a test system sporadically hangs during boot (Dell PowerEdge R720 that boots from a hard disk connected to a MegaRAID SAS adapter) and also that

Re: [PATCH] ide: Make ide_cdrom_prep_fs() initialize the sense buffer pointer

2017-11-02 Thread Bart Van Assche
On Thu, 2017-11-02 at 10:36 +0800, Hongxu Jia wrote: > Apply this patch, and the test on my platform is passed. Thank you for having tested this patch. Does this mean that you are OK with adding the following to this patch: Tested-by: Hongxu Jia ? Bart.

Re: [PATCH] ide: Make ide_cdrom_prep_fs() initialize the sense buffer pointer

2017-11-01 Thread Bart Van Assche
On Wed, 2017-11-01 at 15:31 -0700, Bart Van Assche wrote: > The changes introduced through commit 82ed4db499b8 assume that the > sense buffer pointer in struct scsi_request is initialized for all > requests - passthrough and filesystem requests. Hence make sure > that that pointer is

[PATCH] ide: Make ide_cdrom_prep_fs() initialize the sense buffer pointer

2017-11-01 Thread Bart Van Assche
because the scsi_req_init() call in ide_initialize_rq() already initializes the .cmd. Fixes: commit 82ed4db499b8 ("block: split scsi_request out of struct request") Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> Cc: Christoph Hellwig <h...@lst.de> Cc: Hongxu Jia <

Re: [PATCH V2 0/2] block: remove unnecessary RESTART

2017-11-01 Thread Bart Van Assche
On Thu, 2017-11-02 at 00:59 +0800, Ming Lei wrote: > The commit has described clearly that we don't need to iterate over all hw > queue when completing an I/O. You quoted a small part of the description of commit da55f2cc7841 and left out the part that shows that what you wrote above is not

Re: [PATCH 1/1] [RFC] blk-mq: fix queue stalling on shared hctx restart

2017-11-01 Thread Bart Van Assche
On Mon, 2017-10-23 at 17:12 +0200, Roman Penyaev wrote: > On Fri, Oct 20, 2017 at 10:05 PM, Bart Van Assche wrote: > > Commit 6d8c6c0f97ad is something I came up with to fix queue lockups in the > > SCSI and dm-mq drivers. > > You mean fairness? (some hctx get l

Re: [PATCH V2 0/2] block: remove unnecessary RESTART

2017-11-01 Thread Bart Van Assche
On Wed, 2017-11-01 at 12:08 +0800, Ming Lei wrote: > On Wed, Nov 01, 2017 at 03:54:09AM +0000, Bart Van Assche wrote: > > On Tue, 2017-10-31 at 09:47 +0800, Ming Lei wrote: > > > On Mon, Oct 30, 2017 at 08:24:57PM +0000, Bart Van Assche wrote: > > > > On Fri, 2017-

Re: [PATCH] ide:ide-cd: fix kernel panic resulting from missing scsi_req_init

2017-11-01 Thread Bart Van Assche
On Wed, 2017-11-01 at 09:44 +0800, Hongxu Jia wrote: > On 2017年10月31日 23:23, Bart Van Assche wrote: > > On Tue, 2017-10-31 at 15:39 +0800, Hongxu Jia wrote: > > > Since we split the scsi_request out of struct request, while the > > > standard prep_rq_fn builds 10 byt

Re: [PATCH v2 2/8] crypto: scompress - use sgl_alloc() and sgl_free()

2017-11-01 Thread Bart Van Assche
On Wed, 2017-11-01 at 15:17 +, Ard Biesheuvel wrote: > On 1 November 2017 at 14:50, Bart Van Assche <bart.vanass...@wdc.com> wrote: > > On Mon, 2017-10-16 at 15:49 -0700, Bart Van Assche wrote: > > > Use the sgl_alloc() and sgl_free() functions instead of open codi

Re: [PATCH v2 2/8] crypto: scompress - use sgl_alloc() and sgl_free()

2017-11-01 Thread Bart Van Assche
On Mon, 2017-10-16 at 15:49 -0700, Bart Van Assche wrote: > Use the sgl_alloc() and sgl_free() functions instead of open coding > these functions. > > Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> > Cc: Ard Biesheuvel <ard.biesheu...@linaro.org

Re: [PATCH V2 0/2] block: remove unnecessary RESTART

2017-10-31 Thread Bart Van Assche
On Tue, 2017-10-31 at 09:47 +0800, Ming Lei wrote: > On Mon, Oct 30, 2017 at 08:24:57PM +0000, Bart Van Assche wrote: > > On Fri, 2017-10-27 at 13:38 +0800, Ming Lei wrote: > > > On Fri, Oct 27, 2017 at 04:53:18AM +0000, Bart Van Assche wrote: > > > > On Fri, 2017-

Re: [PATCH] ide:ide-cd: fix kernel panic resulting from missing scsi_req_init

2017-10-31 Thread Bart Van Assche
On Tue, 2017-10-31 at 15:39 +0800, Hongxu Jia wrote: > Since we split the scsi_request out of struct request, while the > standard prep_rq_fn builds 10 byte cmds, it missed to invoke > scsi_req_init() to initialize certain fields of a scsi_request > structure (.__cmd[], .cmd, .cmd_len and

[PATCH v11 4/7] ide, scsi: Tell the block layer at request allocation time about preempt requests

2017-10-30 Thread Bart Van Assche
Convert blk_get_request(q, op, __GFP_RECLAIM) into blk_get_request_flags(q, op, BLK_MQ_PREEMPT). This patch does not change any functionality. Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> Tested-by: Martin Steigerwald <mar...@lichtvoll.de> Acked-by: David S. Miller <da..

[PATCH v11 5/7] block: Add the QUEUE_FLAG_PREEMPT_ONLY request queue flag

2017-10-30 Thread Bart Van Assche
This flag will be used in the next patch to let the block layer core know whether or not a SCSI request queue has been quiesced. A quiesced SCSI queue namely only processes RQF_PREEMPT requests. Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> Reviewed-by: Hannes Reinecke <h...

[PATCH v11 7/7] block, nvme: Introduce blk_mq_req_flags_t

2017-10-30 Thread Bart Van Assche
functionality. Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Cc: linux-n...@lists.infradead.org Cc: Christoph Hellwig <h...@lst.de> Cc: Johannes Thumshirn <jthumsh...@suse.de> Cc: Ming Lei <ming@redhat.com> ---

[PATCH v11 6/7] block, scsi: Make SCSI quiesce and resume work reliably

2017-10-30 Thread Bart Van Assche
ng ..." >>hibernate-test-log.txt systemctl hibernate sleep 10 kill "${pids[@]}" echo idle > /sys/block/md0/md/sync_action wait echo "$(date) Done." >>hibernate-test-log.txt done Reported-by: Oleksandr Natalenko <oleksa...@natalenko.name

[PATCH v11 1/7] block: Make q_usage_counter also track legacy requests

2017-10-30 Thread Bart Van Assche
ed a comment and made sure REQ_NOWAIT is handled properly in blk_old_get_request() ] Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by: Hannes Reinecke <h...@suse.c

[PATCH v11 2/7] block: Introduce blk_get_request_flags()

2017-10-30 Thread Bart Van Assche
A side effect of this patch is that the GFP mask that is passed to several allocation functions in the legacy block layer is changed from GFP_KERNEL into __GFP_DIRECT_RECLAIM. Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> Reviewed-by: Hannes Reinecke <h...@suse.com> Teste

[PATCH v11 0/7] block, scsi, md: Improve suspend and resume

2017-10-30 Thread Bart Van Assche
comments. Changes compared to v1 of this patch series: - Changed the approach and rewrote the patch series. Bart Van Assche (6): block: Introduce blk_get_request_flags() block: Introduce BLK_MQ_REQ_PREEMPT ide, scsi: Tell the block layer at request allocation time about preempt requests

Re: [PATCH v2 6/8] scsi/ipr: Use sgl_alloc_order() and sgl_free_order()

2017-10-30 Thread Bart Van Assche
On Wed, 2017-10-18 at 15:57 -0500, Brian King wrote: > On 10/17/2017 01:19 AM, Hannes Reinecke wrote: > > On 10/17/2017 12:49 AM, Bart Van Assche wrote: > > > [ ... ] > > > > Not sure if this is a valid conversion. > > Originally the driver would allocate a si

Re: [PATCH V2 0/2] block: remove unnecessary RESTART

2017-10-30 Thread Bart Van Assche
On Fri, 2017-10-27 at 13:38 +0800, Ming Lei wrote: > On Fri, Oct 27, 2017 at 04:53:18AM +0000, Bart Van Assche wrote: > > On Fri, 2017-10-27 at 12:43 +0800, Ming Lei wrote: > > > The 1st patch removes the RESTART for TAG-SHARED because SCSI handles it > > > by itself,

Re: [PATCH] block: Fix a race between blk_cleanup_queue() and timeout handling

2017-10-30 Thread Bart Van Assche
On Thu, 2017-10-19 at 10:00 -0700, Bart Van Assche wrote: > Make sure that if the timeout timer fires after a queue has been > marked "dying" that the affected requests are finished. > > Reported-by: chenxiang (M) <chenxian...@hisilicon.com> > Fixes: commit 28792

[PATCH] block: Rework drivers/cdrom/Makefile

2017-10-30 Thread Bart Van Assche
of from the lower layer to the higher layers. Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> Cc: Christoph Hellwig <h...@lst.de> Cc: Hannes Reinecke <h...@suse.de> Cc: Johannes Thumshirn <jthumsh...@suse.de> --- drivers/block/Kconfig| 12 driv

Re: [PATCH v4] virtio_blk: Fix an SG_IO regression

2017-10-28 Thread Bart Van Assche
On Fri, 2017-10-27 at 08:24 -0600, Jens Axboe wrote: > On 10/27/2017 12:39 AM, Christoph Hellwig wrote: > > How about only defininig the initialize_rq method and implementation > > if CONFIG_VIRTIO_BLK_SCSI is set? > > I did that while merging it. Thanks Jens and Christoph! Bart.

Re: [PATCH V2 0/2] block: remove unnecessary RESTART

2017-10-26 Thread Bart Van Assche
On Fri, 2017-10-27 at 12:43 +0800, Ming Lei wrote: > The 1st patch removes the RESTART for TAG-SHARED because SCSI handles it > by itself, and not necessary to waste CPU to do the expensive RESTART. > And Roman Pen reported that this RESTART cuts half of IOPS in his case. > > The 2nd patch

[PATCH v4] virtio_blk: Fix an SG_IO regression

2017-10-26 Thread Bart Van Assche
: Make most scsi_req_init() calls implicit") Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> Cc: Michael S. Tsirkin <m...@redhat.com> Cc: Dann Frazier <dann.fraz...@canonical.com> Cc: <sta...@vger.kernel.org> # v4.13 --- drivers/block/virtio_blk.c | 10 ++ 1 fi

Re: [PATCH v3] virtio_blk: Fix an SG_IO regression

2017-10-26 Thread Bart Van Assche
On Thu, 2017-10-26 at 07:30 +0200, Bart Van Assche wrote: > +static void virtblk_initialize_rq(struct request *req) > +{ > + struct virtblk_req *vbr = blk_mq_rq_to_pdu(req); > + > + scsi_req_init(>sreq); > +} Please ignore v3 - the build fails with this version for C

Re: [PATCH v2] virtio_blk: Fix an SG_IO regression

2017-10-25 Thread Bart Van Assche
On Wed, 2017-10-25 at 12:34 -0700, Jens Axboe wrote: > On 10/25/2017 12:25 PM, Bart Van Assche wrote: > > On Wed, 2017-10-25 at 11:23 -0700, Jens Axboe wrote: > > > On 10/25/2017 02:56 AM, Bart Van Assche wrote: > > > > Avoid that submitting an SG_I

Re: [PATCH v2] virtio_blk: Fix an SG_IO regression

2017-10-25 Thread Bart Van Assche
On Wed, 2017-10-25 at 21:37 +0200, h...@lst.de wrote: > Honestly I think the right fix is to just kill the SCSI passthrough > in virtio. It has been replaced by virtio-scsi a long time ago, and > has been disabled by default in qemu for a long time (and I don't > think any other hypervisor ever

Re: [PATCH v2] virtio_blk: Fix an SG_IO regression

2017-10-25 Thread Bart Van Assche
On Wed, 2017-10-25 at 11:23 -0700, Jens Axboe wrote: > On 10/25/2017 02:56 AM, Bart Van Assche wrote: > > Avoid that submitting an SG_IO ioctl triggers a kernel oops that > > is preceded by: > > > > usercopy: kernel memory overwrite attempt detected to (null) () (6

[PATCH v2] virtio_blk: Fix an SG_IO regression

2017-10-25 Thread Bart Van Assche
: Make most scsi_req_init() calls implicit") Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> Tested-by: Dann Frazier <dann.fraz...@canonical.com> Cc: Michael S. Tsirkin <m...@redhat.com> Cc: Dann Frazier <dann.fraz...@canonical.com> Cc: <sta...@vger.kernel.org&g

Re: [bug report] regression bisected to "block: Make most scsi_req_init() calls implicit"

2017-10-23 Thread Bart Van Assche
On Mon, 2017-10-23 at 09:41 -0600, dann frazier wrote: > (gdb) list *(sg_io+0x120) > 0x084e71a8 is in sg_io (./include/linux/uaccess.h:113). > 108 static inline unsigned long > 109 _copy_from_user(void *to, const void __user *from, unsigned long n) > 110 { > 111 unsigned

Re: [PATCH] blk-mq: Iterate also over sched_tags requests at blk_mq_tagset_iter()

2017-10-23 Thread Bart Van Assche
On Sun, 2017-10-22 at 13:47 +, Israel Rukshin wrote: > @@ -441,6 +442,8 @@ static int blk_mq_sched_alloc_tags(struct request_queue > *q, > if (!hctx->sched_tags) > return -ENOMEM; > > + set->sched_tags[hctx_idx] = hctx->sched_tags; > + > ret =

Re: [RESEND PATCH 1/3] completion: Add support for initializing completion with lockdep_map

2017-10-22 Thread Bart Van Assche
On Sat, 2017-10-21 at 11:23 +0900, Byungchul Park wrote: > On Sat, Oct 21, 2017 at 4:58 AM, Bart Van Assche <bart.vanass...@wdc.com> > wrote: > > As explained in another e-mail thread, unlike the lock inversion checking > > performed by the <= v4.13 lockdep c

Re: [PATCH v10 00/10] block, scsi, md: Improve suspend and resume

2017-10-21 Thread Bart Van Assche
On Sat, 2017-10-21 at 17:59 +, Bart Van Assche wrote: > On Sat, 2017-10-21 at 19:21 +0200, Oleksandr Natalenko wrote: > > I've cherry-picked this series for current upstream/master branch, and got > > this while performing another suspend try: > > > > === > >

Re: [PATCH v10 00/10] block, scsi, md: Improve suspend and resume

2017-10-21 Thread Bart Van Assche
On Sat, 2017-10-21 at 19:21 +0200, Oleksandr Natalenko wrote: > I've cherry-picked this series for current upstream/master branch, and got > this while performing another suspend try: > > === > [ 62.415890] Freezing of tasks failed after 20.007 seconds (1 tasks > refusing > to freeze,

Re: [bug report] regression bisected to "block: Make most scsi_req_init() calls implicit"

2017-10-20 Thread Bart Van Assche
On Fri, 2017-10-20 at 16:54 -0600, dann frazier wrote: > hey, > I'm seeing a regression when executing 'dmraid -r -c' in an arm64 > QEMU guest, which I've bisected to the following commit: > > ca18d6f7 "block: Make most scsi_req_init() calls implicit" > > I haven't yet had time to try and

Re: [PATCH 1/1] [RFC] blk-mq: fix queue stalling on shared hctx restart

2017-10-20 Thread Bart Van Assche
On Fri, 2017-10-20 at 11:39 +0200, Roman Penyaev wrote: > But what bothers me is these looong loops inside blk_mq_sched_restart(), > and since you are the author of the original 6d8c6c0f97ad ("blk-mq: Restart > a single queue if tag sets are shared") I want to ask what was the original > problem

Re: [RESEND PATCH 1/3] completion: Add support for initializing completion with lockdep_map

2017-10-20 Thread Bart Van Assche
On Fri, 2017-10-20 at 08:34 +0200, Thomas Gleixner wrote: > On Thu, 19 Oct 2017, Bart Van Assche wrote: > > Are there any completion objects for which the cross-release checking is > > useful? > > All of them by definition. Sorry but I'm not sure that's the best possible

Re: [RESEND PATCH 1/3] completion: Add support for initializing completion with lockdep_map

2017-10-19 Thread Bart Van Assche
On Wed, 2017-10-18 at 18:38 +0900, Byungchul Park wrote: > Sometimes, we want to initialize completions with sparate lockdep maps > to assign lock classes under control. For example, the workqueue code > manages lockdep maps, as it can classify lockdep maps properly. > Provided a function for that

Re: [PATCH 1/1] [RFC] blk-mq: fix queue stalling on shared hctx restart

2017-10-19 Thread Bart Van Assche
On Wed, 2017-10-18 at 12:22 +0200, Roman Pen wrote: > the patch below fixes queue stalling when shared hctx marked for restart > (BLK_MQ_S_SCHED_RESTART bit) but q->shared_hctx_restart stays zero. The > root cause is that hctxs are shared between queues, but 'shared_hctx_restart' > belongs to the

<    5   6   7   8   9   10   11   12   13   14   >