Re: blk-mq + bfq IO hangs after writing partition table

2017-12-01 Thread Ming Lei
On Fri, Dec 01, 2017 at 06:52:37AM +, i...@ludios.org wrote: > > Hi, > > I think I am triggering a blk-mq + bfq bug that I can reproduce 100% > of the time by using gdisk (1.0.1-1 in Debian stretch) to write a > partition table to a USB flash drive. After it is triggered, IO hangs > forever

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

2017-12-01 Thread Bart Van Assche
On Fri, 2017-12-01 at 10:58 +0800, Ming Lei wrote: > On Thu, Nov 30, 2017 at 04:08:45PM -0800, Bart Van Assche wrote: > > blk_mq_sched_mark_restart_hctx() must be called before > > Could you please describe the theory on commit log? Like, why is it > a must? and what is the issue to be fixed?

Re: [PATCH V2 0/2] block: fix queue freeze and cleanup

2017-12-01 Thread Mauricio Faria de Oliveira
Hi Bart, On 12/01/2017 02:08 PM, Bart Van Assche wrote: The test chenxiang ran does not prove that there is anything wrong with v2. Maybe chenxiang hit the issue described inhttps://lkml.org/lkml/2017/9/5/381? Unfortunately v2 has been found to exhibit another problem, an Oops in the systemd

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

2017-12-01 Thread Jeff Layton
On Thu, 2017-11-30 at 17:41 +0100, Jiri Kosina wrote: > On Fri, 1 Dec 2017, Yu Chen wrote: > > > BTW, is nfs able to be included in this set? I also encountered a > > freeze() failure due to nfs access during that stage recently. > > The freezer usage in NFS is magnitudes more complicated, so

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

2017-12-01 Thread Bart Van Assche
On Thu, 2017-11-30 at 20:03 -0700, Jens Axboe wrote: > On 11/30/2017 05:08 PM, Bart Van Assche wrote: > > This patch does not change any functionality. > > Unless these actually found real bugs, I think it's pointless. > Add a comment. Hello Jens, As you know lockdep_assert_held() statements

Re: [PATCH] blk-mq: improve tag waiting setup for non-shared tags

2017-12-01 Thread Bart Van Assche
On Thu, 2017-11-09 at 16:00 -0700, Jens Axboe wrote: > + spin_lock(_hctx->lock); > + if (!list_empty(>entry)) { > + spin_unlock(_hctx->lock); > + return false; > + } > > - ws = bt_wait_ptr(_hctx->tags->bitmap_tags,

Re: blk-mq + bfq: udevd hang on usb2 storages

2017-12-01 Thread Ming Lei
On Fri, Dec 01, 2017 at 06:04:29PM +0100, Alban Browaeys wrote: > I initially reported as https://bugzilla.kernel.org/show_bug.cgi?id=198 > 023 . > > I have now bisected this issue to commit a6a252e6491443c1c1 "blk-mq- > sched: decide how to handle flush rq via RQF_FLUSH_SEQ". > > This is with

Re: [PATCH] bsg: update bsg_device_list to utilize static hash table implementation.

2017-12-01 Thread Tim Hansen
This patch was submitted as an effort to standardize on Sasha's hashtable implementation. Just a friendly ping to get some comments on this patch, been about 2 months with no comments on it at all. Are there any changes to be requested or issues raised with this change?

Re: [PATCH 03/11] fs: add frozen sb state helpers

2017-12-01 Thread Jan Kara
On Thu 30-11-17 20:05:48, Luis R. Rodriguez wrote: > On Thu, Nov 30, 2017 at 06:13:10PM +0100, Jan Kara wrote: > > ... I dislike the _by_user() suffix as there may be different places that > > call freeze_super() (e.g. device mapper does this during some operations). > > Clearly we need to

Re: blk-mq + bfq IO hangs after writing partition table

2017-12-01 Thread Ivan Kozik
On Fri, Dec 1, 2017 at 8:50 AM, Ming Lei wrote: > Could you run the following script[1] and provide us the result after > the IO hang is triggered? > > #./dump-blk-info /dev/sdX #/dev/sdX is name of your USB disk > > [1]

Re: [PATCH V15 00/22] mmc: Add Command Queue support

2017-12-01 Thread Adrian Hunter
On 29/11/17 17:47, Ulf Hansson wrote: > Hi Adrian, > > On 29 November 2017 at 14:40, Adrian Hunter wrote: >> Hi >> >> Here is V15 of the hardware command queue patches without the software >> command queue patches, now using blk-mq and now with blk-mq support for >>

Re: blk-mq + bfq IO hangs after writing partition table

2017-12-01 Thread Ming Lei
On Fri, Dec 01, 2017 at 12:18:25PM +, Ivan Kozik wrote: > On Fri, Dec 1, 2017 at 8:50 AM, Ming Lei wrote: > > Could you run the following script[1] and provide us the result after > > the IO hang is triggered? > > > > #./dump-blk-info /dev/sdX #/dev/sdX is

Re: [PATCH V2 0/2] block: fix queue freeze and cleanup

2017-12-01 Thread Bart Van Assche
On Fri, 2017-12-01 at 13:36 -0200, Mauricio Faria de Oliveira wrote: > On 11/29/2017 12:57 AM, chenxiang (M) wrote: > > I applied this v2 patchset to kernel 4.15-rc1, running fio on a SATA > > disk, then disable the disk with sysfs interface > > (echo 0 > /sys/class/sas_phy/phy-1:0:1/enable), and

Re: blk-mq + bfq IO hangs after writing partition table

2017-12-01 Thread Ming Lei
On Fri, Dec 01, 2017 at 02:46:39PM +, Ivan Kozik wrote: > On Fri, Dec 1, 2017 at 1:35 PM, Ming Lei wrote: > > Basically all IO hang happen inside get_request(), and seems this issue > > isn't related with recent change in V4.15, could you run V4.14 to see if > > there is

Re: blk-mq + bfq IO hangs after writing partition table

2017-12-01 Thread Ivan Kozik
On Fri, Dec 1, 2017 at 1:35 PM, Ming Lei wrote: > Basically all IO hang happen inside get_request(), and seems this issue > isn't related with recent change in V4.15, could you run V4.14 to see if > there is such issue? I tried several times and I could not reproduce the

Re: [PATCH V2 0/2] block: fix queue freeze and cleanup

2017-12-01 Thread Mauricio Faria de Oliveira
Hi Ming Lei, On 11/29/2017 12:57 AM, chenxiang (M) wrote: I applied this v2 patchset to kernel 4.15-rc1, running fio on a SATA disk, then disable the disk with sysfs interface (echo 0 > /sys/class/sas_phy/phy-1:0:1/enable), and find system is hung. But with v1 patch, it doesn't has this

Re: [PATCH V2 0/2] block: fix queue freeze and cleanup

2017-12-01 Thread Ming Lei
On Fri, Dec 01, 2017 at 01:36:13PM -0200, Mauricio Faria de Oliveira wrote: > Hi Ming Lei, > > On 11/29/2017 12:57 AM, chenxiang (M) wrote: > > I applied this v2 patchset to kernel 4.15-rc1, running fio on a SATA > > disk, then disable the disk with sysfs interface > > (echo 0 >

blk-mq + bfq: udevd hang on usb2 storages

2017-12-01 Thread Alban Browaeys
I initially reported as https://bugzilla.kernel.org/show_bug.cgi?id=198 023 . I have now bisected this issue to commit a6a252e6491443c1c1 "blk-mq- sched: decide how to handle flush rq via RQF_FLUSH_SEQ". This is with an USB stick Sandisk Cruzer (USB Version: 2.10) I regressed with. systemctl

Re: [PATCH V2 0/2] block: fix queue freeze and cleanup

2017-12-01 Thread Ming Lei
On Fri, Dec 01, 2017 at 04:08:49PM +, Bart Van Assche wrote: > On Fri, 2017-12-01 at 13:36 -0200, Mauricio Faria de Oliveira wrote: > > On 11/29/2017 12:57 AM, chenxiang (M) wrote: > > > I applied this v2 patchset to kernel 4.15-rc1, running fio on a SATA > > > disk, then disable the disk

Re: [PATCH 03/11] fs: add frozen sb state helpers

2017-12-01 Thread Luis R. Rodriguez
On Fri, Dec 01, 2017 at 12:47:24PM +0100, Jan Kara wrote: > On Thu 30-11-17 20:05:48, Luis R. Rodriguez wrote: > > On Thu, Nov 30, 2017 at 06:13:10PM +0100, Jan Kara wrote: > > > ... I dislike the _by_user() suffix as there may be different places that > > > call freeze_super() (e.g. device mapper

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

2017-12-01 Thread Dave Chinner
On Fri, Dec 01, 2017 at 02:05:44PM -0500, Jeff Layton wrote: > On Thu, 2017-11-30 at 17:41 +0100, Jiri Kosina wrote: > > On Fri, 1 Dec 2017, Yu Chen wrote: > > > > > BTW, is nfs able to be included in this set? I also encountered a > > > freeze() failure due to nfs access during that stage

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

2017-12-01 Thread Ming Lei
On Fri, Dec 01, 2017 at 07:52:14PM +, Bart Van Assche wrote: > On Fri, 2017-12-01 at 10:58 +0800, Ming Lei wrote: > > On Thu, Nov 30, 2017 at 04:08:45PM -0800, Bart Van Assche wrote: > > > blk_mq_sched_mark_restart_hctx() must be called before > > > > Could you please describe the theory on

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

2017-12-01 Thread Bart Van Assche
On Sat, 2017-12-02 at 08:36 +0800, Ming Lei wrote: > On Fri, Dec 01, 2017 at 07:52:14PM +, Bart Van Assche wrote: > > On Fri, 2017-12-01 at 10:58 +0800, Ming Lei wrote: > > > On Thu, Nov 30, 2017 at 04:08:45PM -0800, Bart Van Assche wrote: > > > > blk_mq_dispatch_rq_list() is called. Make sure

Re: [PATCH V2 0/2] block: fix queue freeze and cleanup

2017-12-01 Thread Ming Lei
On Fri, Dec 01, 2017 at 04:49:31PM -0200, Mauricio Faria de Oliveira wrote: > Hi Bart, > > On 12/01/2017 02:08 PM, Bart Van Assche wrote: > > The test chenxiang ran does not prove that there is anything wrong with v2. > > Maybe chenxiang hit the issue described > >

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

2017-12-01 Thread Ming Lei
On Sat, Dec 02, 2017 at 12:48:51AM +, Bart Van Assche wrote: > On Sat, 2017-12-02 at 08:36 +0800, Ming Lei wrote: > > On Fri, Dec 01, 2017 at 07:52:14PM +, Bart Van Assche wrote: > > > On Fri, 2017-12-01 at 10:58 +0800, Ming Lei wrote: > > > > On Thu, Nov 30, 2017 at 04:08:45PM -0800, Bart

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

2017-12-01 Thread Bart Van Assche
On Sat, 2017-12-02 at 09:00 +0800, Ming Lei wrote: > On Sat, Dec 02, 2017 at 12:48:51AM +, Bart Van Assche wrote: > > Further tests have shown that the lockup I referred to does not occur > > before commit > > b347689ffbca but that it occurs with b347689ffbca. > > Then you need to root cause

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

2017-12-01 Thread Ming Lei
On Sat, Dec 02, 2017 at 01:05:05AM +, Bart Van Assche wrote: > On Sat, 2017-12-02 at 09:00 +0800, Ming Lei wrote: > > On Sat, Dec 02, 2017 at 12:48:51AM +, Bart Van Assche wrote: > > > Further tests have shown that the lockup I referred to does not occur > > > before commit > > >

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

2017-12-01 Thread Ming Lei
On Sat, Dec 02, 2017 at 01:05:05AM +, Bart Van Assche wrote: > On Sat, 2017-12-02 at 09:00 +0800, Ming Lei wrote: > > On Sat, Dec 02, 2017 at 12:48:51AM +, Bart Van Assche wrote: > > > Further tests have shown that the lockup I referred to does not occur > > > before commit > > >