Re: [PATCH] block: fix use-after-free in seq file

2016-07-29 Thread Jens Axboe
e comment in disk_seqf_stop() says, stop is called even if start failed, so we need to reinitialise the private pointer to NULL when seq iteration stops. An alternative would be to set the private pointer to NULL when the kmalloc() in disk_seqf_start() fails. Applied for 4.8, thanks. -- J

Re: [PATCH] blk-mq: Allow timeouts to run while queue is freezing

2016-07-29 Thread Jens Axboe
to be used. -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] block: fix bdi vs gendisk lifetime mismatch

2016-08-01 Thread Jens Axboe
Signed-off-by: Dan Williams <dan.j.willi...@intel.com> Added for 4.8, thanks Dan. -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Fixup direct bi_rw modifiers

2016-08-01 Thread Jens Axboe
better to get build breakage, than potentially much worse breakage. -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] blkcg: kill unused field nr_undestroyed_grps

2016-07-26 Thread Jens Axboe
On 07/26/2016 03:13 AM, Hou Tao wrote: 'nr_undestroyed_grps' in struct throtl_data was used to count the number of throtl_grp related with throtl_data, but now throtl_grp is tracked by blkcg_gq, so it is useless anymore. Thanks, applied. -- Jens Axboe -- To unsubscribe from this list: send

Re: [BUG] Deadlock in blk_mq_register_disk error path

2016-08-02 Thread Jens Axboe
://git.kernel.dk/cgit/linux-block/commit/?h=for-linus=6316338a94b2319abe9d3790eb9cdc56ef81ac1a -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org

Re: fix loop discard regression

2016-08-04 Thread Jens Axboe
turns them into a write, so the second patch rewrites that handler using a proper switch statement as well. Applied, thanks. -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majord...@vger.kernel.org More majordomo inf

[GIT PULL] Block fixes for 4.8-rc2

2016-08-12 Thread Jens Axboe
Gabriel Krisman Bertazi (1): nvme: Suspend all queues before deletion Jens Axboe (1): Merge branch 'nvmf-4.8-rc' of git://git.infradead.org/nvme-fabrics into for-linus Joe Lawrence (1): doc: update block/queue

Re: [PATCH 1/1] mm/block: convert rw_page users to bio op use

2016-08-04 Thread Jens Axboe
On 08/04/2016 01:59 PM, Mike Christie wrote: On 08/04/2016 02:27 PM, Jens Axboe wrote: On 08/04/2016 11:50 AM, kbuild test robot wrote: Hi Mike, [auto build test ERROR on linus/master] [also build test ERROR on next-20160804] [cannot apply to v4.7] [if your patch is applied to the wrong git

[GIT PULL] Final block changes for 4.8-rc1

2016-08-07 Thread Jens Axboe
nflict was reduced. I just rebased the series on top of current master, and no new ->bi_rw usage has snuck in. Please pull! git://git.kernel.dk/linux-block.git for-linus ---- Jens Axboe (4): block/mm: make bdev_ops->rw_page()

Re: Fixup direct bi_rw modifiers

2016-08-02 Thread Jens Axboe
On 08/02/2016 05:32 AM, Christoph Hellwig wrote: On Mon, Aug 01, 2016 at 01:55:36PM -0600, Jens Axboe wrote: Set of three patches, where the target one is an actual bug fix... Temporary branch, I'll rebase it once -rc1 is out, if more changes/fixups need to be made in the next week until

Re: [BUG] Deadlock in blk_mq_register_disk error path

2016-08-15 Thread Jens Axboe
On 08/15/2016 09:53 AM, Bart Van Assche wrote: On 08/02/2016 10:21 AM, Jens Axboe wrote: On 08/02/2016 06:58 AM, Jinpu Wang wrote: Hi Jens, I found in blk_mq_register_disk, we blk_mq_disable_hotplug which in turn mutex_lock(_q_mutex); queue_for_each_hw_ctx(q, hctx, i) { ret

Re: [PATCH] block: Fix secure erase

2016-08-15 Thread Jens Axboe
pos) == REQ_OP_SECURE_ERASE)) break; This really should be a: if (req_op(rq) != req_op(pos)) I'l lleave it up to Jens if he wants that in this patch or not, otherwise I'll send an incremental patch. Let's get a v2 with that fixed up, it makes a big readability difference. -- J

Re: [PATCH v3] scsi, block: fix duplicate bdi name registration crashes

2017-02-01 Thread Jens Axboe
On 02/01/2017 02:40 PM, Dan Williams wrote: > On Wed, Feb 1, 2017 at 2:35 PM, Jens Axboe <ax...@kernel.dk> wrote: >> On 02/01/2017 02:05 PM, Dan Williams wrote: >>> Warnings of the following form occur because scsi reuses a devt number >>> while the block layer st

Re: [PATCH v3] scsi, block: fix duplicate bdi name registration crashes

2017-02-01 Thread Jens Axboe
ister the bdi, blk_cleanup_queue(). > > Thanks to Omar for the quick reproducer script [2]. This patch survives > where an unmodified kernel fails in a few seconds. What is the patch against? Doesn't seem to apply cleanly for me on master, nor the 4.11 block tree. -- Jens Axboe -- To uns

Re: [PATCH 3/4] block: Dynamically allocate and refcount backing_dev_info

2017-02-01 Thread Jens Axboe
>> fine to me. > > Yeah, probably it is not worth it. I'll remove it. I agree on that, it should not be a hot path. Will you respin the series after making this change? Would be great to get this queued up. -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscrib

Re: [PATCH] block: queue lock must be acquired when iterating over rls

2017-02-01 Thread Jens Axboe
he removed blkg->q_node > list node. Thanks, applied. -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 7/8] mq-deadline: add blk-mq adaptation of the deadline IO scheduler

2017-02-02 Thread Jens Axboe
On 02/02/2017 02:15 PM, Paolo Valente wrote: > >> Il giorno 02 feb 2017, alle ore 16:30, Jens Axboe <ax...@fb.com> ha scritto: >> >> On 02/02/2017 02:19 AM, Paolo Valente wrote: >>> The scheme is clear. One comment, in case it could make sense and >>

Re: block for-next: zram build error

2017-02-02 Thread Jens Axboe
commit/?h=for-4.11/next=e17354961bb50931ec7b33f59c0713dcf98ac7d2 It's caused by commit: commit dc3b17cc8bf21307c7e076e7c778d5db756f7871 Author: Jan Kara <j...@suse.cz> Date: Thu Feb 2 15:56:50 2017 +0100 block: Use pointer to backing_dev_info from request_queue -- Jens Axboe -- To

Re: [PATCH] blk-mq-sched: bypass the scheduler for flushes entirely

2017-02-02 Thread Jens Axboe
k_mq_sched_bypass_insert(), > let's do it in the common framework. Thanks Omar, looks good to me. After a cycle or two, we can kill the debug loop in blk_mq_sched_insert_requests(). -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-block&quo

Re: [PATCH] nbd: use an idr to keep track of nbd devices

2017-02-01 Thread Jens Axboe
On 02/01/2017 01:11 PM, Josef Bacik wrote: > To prepare for dynamically adding new nbd devices to the system switch > from using an array for the nbd devices and instead use an idr. This > copies what loop does for keeping track of its devices. Applied for 4.11, thanks. -- J

Re: [PATCH] nbd: use our own workqueue for recv threads

2017-02-01 Thread Jens Axboe
On 02/01/2017 01:11 PM, Josef Bacik wrote: > Since we are in the memory reclaim path we need our recv work to be on a > workqueue that has WQ_MEM_RECLAIM set so we can avoid deadlocks. Also > set WQ_HIGHPRI since we are in the completion path for IO. Applied for 4.11. -- J

Re: [PATCH 7/8] mq-deadline: add blk-mq adaptation of the deadline IO scheduler

2017-02-01 Thread Jens Axboe
uest_queue *q = hctx->queue; struct deadline_data *dd = q->elevator->elevator_data; - int ret; + struct request *free = NULL; + bool ret; spin_lock(>lock); - ret = blk_mq_sched_try_merge(q, bio); + ret = blk_mq_sched_try_merge(q, bio, );

Re: [PATCH 7/8] mq-deadline: add blk-mq adaptation of the deadline IO scheduler

2017-02-01 Thread Jens Axboe
sistently 2) It has the same scope as the queue lock (the one you call the scheduler lock) mq-deadline sets up a per-queue structure, deadline_data, and it has a lock embedded in that structure. This is what mq-deadline uses to serialize access to its data structures, as well as those in the

Re: [REGRESSION v4.10-rc1] blkdev_issue_zeroout() returns -EREMOTEIO on the first call for SCSI device that doesn't support WRITE SAME

2017-02-03 Thread Jens Axboe
On 02/03/2017 03:45 PM, Martin K. Petersen wrote: >>>>>> "Jens" == Jens Axboe <ax...@kernel.dk> writes: > >>> I think we should fix sd.c to only send WRITE SAME if either of the >>> variants are explicitly listed as supported through

Re: [dm-devel] split scsi passthrough fields out of struct request V2

2017-01-31 Thread Jens Axboe
On 01/31/2017 05:01 PM, Bart Van Assche wrote: > On Tue, 2017-01-31 at 13:58 -0800, Jens Axboe wrote: >> Interesting, I'll check this. Doesn't make any sense why the scheduler >> would be implicated in that, given how we run completions now. But if >> it complains, then

Re: [PATCH 00/12] lightnvm: 4.11 patches

2017-01-31 Thread Jens Axboe
. > > - Interface cleanups for target implementations. Enables pblk to be >simplified. > > - Fix memory leak on target creation failure. > > - Clean up end_io() path so that it follows the same approach as bio > structures to end ios. Applied for 4.11, thanks.

Re: remove the cmd_type field from struct request

2017-01-31 Thread Jens Axboe
hrough libata that would need to be added, before we can git rm drivers/ide/ ? -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [dm-devel] split scsi passthrough fields out of struct request V2

2017-02-01 Thread Jens Axboe
On 02/01/2017 08:46 AM, Bart Van Assche wrote: > On Tue, 2017-01-31 at 22:38 -0800, Jens Axboe wrote: >> I think this patch: >> >> http://git.kernel.dk/cgit/linux-block/commit/?h=for-4.11/block=12d70958a2e8d587acaa51dafd5d6620e00b7543 >> >> should fix it for yo

Re: [lkp-robot] [scsi, block] 0dba1314d4: WARNING:at_fs/sysfs/dir.c:#sysfs_warn_dup

2017-02-06 Thread Jens Axboe
cache: enabled, > supports DPO and FUA > [6.647077] kobject (d5078ca4): tried to init an initialized object, > something is seriously wrong. So sda is probed twice, and hilarity ensues when we try to register it twice. I can't reproduce this, using scsi_debug and with scsi_async enabled. This is running linux-next? What's your .config? -- Jens Axboe

Re: [PATCH] genhd: Do not hold event lock when scheduling workqueue elements

2017-02-07 Thread Jens Axboe
ccessfully and then the kernel > hangs here. > > I believe something is broken recently, because I don't have any issue before > Jan 31. Can you try and bisect it? -- Jens Axboe

Re: support for multi-range discard requests V3

2017-02-08 Thread Jens Axboe
workloads on NVMe, and for slower devices that use I/O scheduling > the number will probably be even bigger but I've not implemented > that support yet. This looks good to me. It's running testing now, but provided that the tests are successful, we should get this queued up for 4.11. -- Jens Axboe

Boot regression (was "Re: [PATCH] genhd: Do not hold event lock when scheduling workqueue elements")

2017-02-08 Thread Jens Axboe
On 02/08/2017 03:48 AM, Dexuan Cui wrote: >> From: Jens Axboe [mailto:ax...@kernel.dk] >> Sent: Wednesday, February 8, 2017 00:09 >> To: Dexuan Cui <de...@microsoft.com>; Bart Van Assche >> <bart.vanass...@sandisk.com>; h...@suse.com; h...@suse.de >> Cc:

[GIT PULL] WRITE_SAME regression fix for 4.10

2017-02-07 Thread Jens Axboe
): block: don't try Write Same from __blkdev_issue_zeroout block/blk-lib.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) -- Jens Axboe

Re: [PATCH 0/5 v3] BDI lifetime fix

2017-02-02 Thread Jens Axboe
omic_t for refcount > * Get rid of free_on_put flag Added for 4.11, thanks Jan! -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 0/6] block: fix blk-mq debugfs vs. blktrace

2017-02-02 Thread Jens Axboe
structure, with the > correct name, how could it have been created? Can't you save the dentry > to the debugfs file in the structure that has the name? The problem is that blktrace registers a trace name directory, which can be either whole device or partition, depending on what you trace. F

Re: [PATCH v3] scsi, block: fix duplicate bdi name registration crashes

2017-02-02 Thread Jens Axboe
On 02/01/2017 03:43 PM, Jens Axboe wrote: > On 02/01/2017 02:40 PM, Dan Williams wrote: >> On Wed, Feb 1, 2017 at 2:35 PM, Jens Axboe <ax...@kernel.dk> wrote: >>> On 02/01/2017 02:05 PM, Dan Williams wrote: >>>> Warnings of the following form occur because

[PATCH 1/2] blk-merge: return the merged request

2017-02-02 Thread Jens Axboe
. There should be no functional changes in this patch. Signed-off-by: Jens Axboe <ax...@fb.com> --- block/blk-merge.c | 31 --- block/blk.h | 4 ++-- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/block/blk-merge.c b/block/blk-merge.c

Re: [PATCH 7/8] mq-deadline: add blk-mq adaptation of the deadline IO scheduler

2017-02-02 Thread Jens Axboe
t worry about the IRQ disabling lock. -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 0/2] blk-mq-sched: fix put_rq_private() lock inconsistency

2017-02-02 Thread Jens Axboe
them without any locks held, but for the case where we get a successful request-to-request merge on the back of a bio-to-request merge, we can invoke it with whatever lock the scheduler held when it called blk_mq_sched_try_merge(). -- Jens Axboe -- To unsubscribe from this list: send the line

[PATCH 2/2] block: free merged request in the caller

2017-02-02 Thread Jens Axboe
problem of invoking parts of the scheduler with an unknown lock state. Reported-by: Paolo Valente <paolo.vale...@linaro.org> Signed-off-by: Jens Axboe <ax...@fb.com> --- block/blk-core.c | 12 +--- block/blk-merge.c| 15 --- block/blk-mq-sched.c | 9 ++---

Re: [PATCH v2] blk-mq-sched: separate mark hctx and queue restart operations

2017-02-06 Thread Jens Axboe
On 02/06/2017 12:53 PM, Omar Sandoval wrote: > On Mon, Feb 06, 2017 at 12:39:57PM -0700, Jens Axboe wrote: >> On 02/06/2017 12:24 PM, Omar Sandoval wrote: >>> From: Omar Sandoval <osan...@fb.com> >>> >>> In blk_mq_sched_dispatch_requests(), we call blk_mq_

Re: [PATCH] block: don't try Write Same from __blkdev_issue_zeroout

2017-02-06 Thread Jens Axboe
te Same from blkdev_issue_zeroout an don't try it > at all from __blkdev_issue_zeroout as a non-invasive workaround. Thanks, added for 4.10. -- Jens Axboe

Re: [PATCH] blk-mq-sched: (un)register elevator when (un)registering queue

2017-02-06 Thread Jens Axboe
is is because we skip the initial > elevator register/unregister when we don't have a ->request_fn(), but we > should still do it for the ->mq_ops case. Good catch Omar, applied. -- Jens Axboe

Re: [PATCH v4] dm: don't allow ioctls to targets that don't map to whole devices

2017-02-04 Thread Jens Axboe
> As the SCSI ioctl code is now optional, we really don't want to > drag it in for DM, and the exception is not very useful anyway. > > Signed-off-by: Christoph Hellwig <h...@lst.de> > Acked-by: Mike Snitzer <snit...@redhat.com> Added, with the acks/reviews from Johannes and Pablo added. -- Jens Axboe

Re: [PATCH RESEND] blkcg: fix double free of new_blkg in blkcg_init_queue

2017-02-03 Thread Jens Axboe
On 02/03/2017 02:19 AM, Hou Tao wrote: > If blkg_create fails, new_blkg passed as an argument will > be freed by blkg_create, so there is no need to free it again. Thanks, looks good to me. Applied. -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe

Re: [REGRESSION v4.10-rc1] blkdev_issue_zeroout() returns -EREMOTEIO on the first call for SCSI device that doesn't support WRITE SAME

2017-02-03 Thread Jens Axboe
iant of blkdev_issue_zeroout"). Before the commit, blkdev_issue_zeroout > fell back to normal zero writing when WRITE SAME failed and it seems > sd driver's heuristics depends on that behaviour. CC Christoph and Chaitanya. -- Jens Axboe -- To unsubscribe from this list: send the line &

Re: [REGRESSION v4.10-rc1] blkdev_issue_zeroout() returns -EREMOTEIO on the first call for SCSI device that doesn't support WRITE SAME

2017-02-03 Thread Jens Axboe
On 02/03/2017 09:12 AM, Christoph Hellwig wrote: > On Fri, Feb 03, 2017 at 08:21:31AM -0700, Jens Axboe wrote: >>> Error 121 (EREMOTEIO) was returned from blkdev_issue_zeroout(). >>> That came from sd driver because WRITE SAME was sent to the device >>> which didn't s

Re: [PATCH 0/6] block: fix blk-mq debugfs vs. blktrace

2017-02-02 Thread Jens Axboe
ectories. > > I tested this with multiple configurations, so hopefully I didn't mess > that up this time. > > Applies to for-4.11/block. Applied with Greg's ack on the first patch, thanks Omar. -- Jens Axboe -- To unsubscribe from this list: send the line "unsubsc

Re: remove the cmd_type field from struct request

2017-01-31 Thread Jens Axboe
make life easier I also have a git > tree available here: > > git://git.infradead.org/users/hch/block.git cmd_type > > > http://git.infradead.org/users/hch/block.git/shortlog/refs/heads/cmd_type Looks good to me, applied for 4.11. -- Jens Axboe -- To unsubscri

Re: remove the cmd_type field from struct request

2017-01-31 Thread Jens Axboe
> I'd gladly wrote one, getting tired of my current OSS work... :-) Pretty sure I told Jeff originally that libata should only go into the kernel, if there was a plan to make it independent of SCSI. A promise was made that of course it would, but that promise was never held, unfortunately. --

Re: [PATCH 0/4] Four patches for the blk-mq debugfs code

2017-02-01 Thread Jens Axboe
On 02/01/2017 10:20 AM, Bart Van Assche wrote: > Hello Jens, > > Please consider the four patches in this series for kernel v4.11. Added, thanks Bart. -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majord

Re: [PATCH V2 1/3] blk-mq: allocate blk_mq_tags and requests in correct node

2017-02-01 Thread Jens Axboe
. All three patches look good to me. Bjorn, to avoid complications, if you can review/ack patch #2, then I will queue it up through the block tree for 4.11. -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majord...@vger.ker

Re: [PATCH] block: Update comments that refer to __bio_map_user() and bio_map_user()

2017-02-01 Thread Jens Axboe
On 02/01/2017 08:20 AM, Bart Van Assche wrote: > Since __bio_map_user() and bio_map_user() have been removed, update > the comments that still refer to these functions. Applied, thanks Bart. -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-block&q

Re: [dm-devel] split scsi passthrough fields out of struct request V2

2017-01-31 Thread Jens Axboe
On 01/31/2017 01:55 PM, Bart Van Assche wrote: > On Tue, 2017-01-31 at 13:34 -0800, Bart Van Assche wrote: >> On Mon, 2017-01-30 at 17:38 -0800, Jens Axboe wrote: >>> That's a known bug in mainline. Pull it into 4.10-rc6, >>> or use my for-next where everything is alread

Re: [PATCH] block: Initialize cfqq->ioprio_class in cfq_get_queue()

2017-01-23 Thread Jens Axboe
On 01/23/2017 08:49 AM, Alexander Potapenko wrote: > On Mon, Jan 23, 2017 at 4:30 PM, Jens Axboe <ax...@fb.com> wrote: >> On 01/23/2017 07:06 AM, Alexander Potapenko wrote: >>> KMSAN (KernelMemorySanitizer, a new error detection tool) reports use of >>> unin

Re: split scsi passthrough fields out of struct request

2017-01-23 Thread Jens Axboe
same clone and map method as the blk-mq version. I'd like to get this in sooner rather than later, so I'll spend some time reviewing and testing it start this week. I'm assuming you are targeting 4.11 with this change, right? -- Jens Axboe -- To unsubscribe from this list: send the line &q

Re: blk-throttle: Move three assignments for the variable "ret" in tg_set_max()

2017-01-23 Thread Jens Axboe
The onus is on the submitter here, not the reviewer. As I said in the previous email, don't bother sending these types of patches for the block layer again. They are just going to be ignored. -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body

Re: __blk_mq_tag_busy() weirdness

2017-01-23 Thread Jens Axboe
've used that in a few places in blk-mq, and in mm/filemap.c as well: commit 7fcbbaf18392f0b17c95e2f033c8ccf87eecde1d Author: Jens Axboe <ax...@fb.com> Date: Thu May 22 11:54:16 2014 -0700 mm/filemap.c: avoid always dirtying mapping->flags on O_DIRECT the test_and_* functions always

Re: [PATCH 3/5] blk-throttle: Adjust two function calls together with a variable assignment

2017-01-23 Thread Jens Axboe
arkus, don't bother sending those patches again for the block layer or drivers, I'm not going to take them. -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] block: Initialize cfqq->ioprio_class in cfq_get_queue()

2017-01-23 Thread Jens Axboe
tialized struct cfq_queue is created by kmem_cache_alloc_node() > and then passed to cfq_init_cfqq(), which accesses cfqq->ioprio_class > before it's initialized. Patch looks fine to me, thanks. Is this a new warning? We don't seem to have changed this path in a while, yet I wonder why

Re: [PATCH] queue stall with blk-mq-sched

2017-01-24 Thread Jens Axboe
lls; > looks like they're related to the 'stonewall' statement in fio. I think you are heading down the wrong path. Your patch will cause the symptoms to be a bit different, but you'll still run into cases where we fail giving out the tag and then stall. -- Jens Axboe -- To unsubscribe from this list: se

Re: [PATCH] queue stall with blk-mq-sched

2017-01-24 Thread Jens Axboe
ed to shared tag maps, which I don't have anything that uses here. I'll see if we are leaking it, you should be able to check that by reading the 'active' file in the sysfs directory. -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body o

Re: [PATCH] queue stall with blk-mq-sched

2017-01-24 Thread Jens Axboe
On 01/24/2017 11:49 AM, Hannes Reinecke wrote: > On 01/24/2017 05:09 PM, Jens Axboe wrote: >> On 01/24/2017 08:54 AM, Hannes Reinecke wrote: >>> Hi Jens, >>> >>> I'm trying to debug a queue stall with your blk-mq-sched branch; with my >>> latest mpt3s

Re: [PATCH] queue stall with blk-mq-sched

2017-01-24 Thread Jens Axboe
On 01/24/2017 12:55 PM, Jens Axboe wrote: > Try this patch. We only want to bump it for the driver tags, not the > scheduler side. More complete version, this one actually tested. I think this should fix your issue, let me know. diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c index a

Re: [PATCH] queue stall with blk-mq-sched

2017-01-26 Thread Jens Axboe
On 01/26/2017 09:35 AM, Hannes Reinecke wrote: > On 01/25/2017 11:27 PM, Jens Axboe wrote: >> On 01/25/2017 10:42 AM, Jens Axboe wrote: >>> On 01/25/2017 10:03 AM, Jens Axboe wrote: >>>> On 01/25/2017 09:57 AM, Hannes Reinecke wrote: >>>>> On 01/25/201

Re: [PATCH] queue stall with blk-mq-sched

2017-01-25 Thread Jens Axboe
On 01/25/2017 10:42 AM, Jens Axboe wrote: > On 01/25/2017 10:03 AM, Jens Axboe wrote: >> On 01/25/2017 09:57 AM, Hannes Reinecke wrote: >>> On 01/25/2017 04:52 PM, Jens Axboe wrote: >>>> On 01/25/2017 04:10 AM, Hannes Reinecke wrote: >>> [ .. ] >>>

Re: [GIT PULL] (xen-blkfront) stable/for-jens-4.10 for your 'linux-next' branch.

2017-01-27 Thread Jens Axboe
XEN_PAGE_SIZE != PAGE_SIZE (4KB vs 64KB > on ARM for example) mishandling while the other is fixing > the accounting for the configuration changes. Pulled, thanks. -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message

[PATCH 3/5] blk-mq: release driver tag on a requeue event

2017-01-26 Thread Jens Axboe
We don't want to hold on to this resource when we have a scheduler attached. Signed-off-by: Jens Axboe <ax...@fb.com> --- block/blk-mq.c | 16 1 file changed, 16 insertions(+) diff --git a/block/blk-mq.c b/block/blk-mq.c index 8041ad330289..089b2eedca4f 100644 --- a/blo

[PATCH 4/5] blk-mq-sched: fix starvation for multiple hardware queues and shared tags

2017-01-26 Thread Jens Axboe
. If that happens, it's not enough to mark the hardware queue as needing a restart, we need to bubble that up to the higher level queue as well. Signed-off-by: Jens Axboe <ax...@fb.com> --- block/blk-mq-sched.c | 28 block/blk-mq-sched.h | 15 +--

[PATCH 1/5] blk-mq: improve scheduler queue sync/async running

2017-01-26 Thread Jens Axboe
We'll use the same criteria for whether we need to run the queue sync or async when we have a scheduler, as we do without one. Signed-off-by: Jens Axboe <ax...@fb.com> --- block/blk-mq.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/block/blk-mq.c b/block/bl

Re: [PATCH 15/16] block: split scsi_request out of struct request

2017-01-26 Thread Jens Axboe
; > Jens, any opinion on just removing the printout of the SCSI CDB > for blktrace? Kill it with fire, I don't think there's much value to having it there to begin with. -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to

[PATCH 2/5] blk-mq: fix potential race in queue restart and driver tag allocation

2017-01-26 Thread Jens Axboe
Once we mark the queue as needing a restart, re-check if we can get a driver tag. This fixes a theoretical issue where the needed IO completes _after_ blk_mq_get_driver_tag() fails, but before we manage to set the restart bit. Signed-off-by: Jens Axboe <ax...@fb.com> --- block/blk-mq

[PATCH 0/5] blk-mq: various blk-mq/blk-mq-sched fixes

2017-01-26 Thread Jens Axboe
I've been diving into the problems that Hannes reported, both the stalls related to shared tag maps and multiple hardware queues, but also the cases where we get suboptimal merging. This series attempts to fix that. Hannes, this should be identical to what I sent you as a bundled up patch

[PATCH 5/5] blk-mq-sched: change ->dispatch_requests() to ->dispatch_request()

2017-01-26 Thread Jens Axboe
exactly at the point where the device can't consume more IO, and leave the rest with the scheduler for better merging and future dispatch decision making. Signed-off-by: Jens Axboe <ax...@fb.com> --- block/blk-mq-sched.c | 23 +++ block/blk-mq.c | 2 +- bl

Re: split scsi passthrough fields out of struct request V2

2017-01-26 Thread Jens Axboe
On 01/26/2017 11:52 AM, Bart Van Assche wrote: > On Thu, 2017-01-26 at 11:44 -0700, Jens Axboe wrote: >> I think this may be my bug - does the below help? > > Hello Jens, > > What tree has that patch been generated against? It does not apply > cleanly on top of Chri

Re: [PATCH] queue stall with blk-mq-sched

2017-01-26 Thread Jens Axboe
On 01/26/2017 09:42 AM, Jens Axboe wrote: > On 01/26/2017 09:35 AM, Hannes Reinecke wrote: >> On 01/25/2017 11:27 PM, Jens Axboe wrote: >>> On 01/25/2017 10:42 AM, Jens Axboe wrote: >>>> On 01/25/2017 10:03 AM, Jens Axboe wrote: >>>>> On 01/25/2017 09:

Re: split scsi passthrough fields out of struct request V2

2017-01-26 Thread Jens Axboe
UA); struct blk_plug *plug; unsigned int request_count = 0; - struct blk_mq_alloc_data data; + struct blk_mq_alloc_data data = { 0, }; struct request *rq; blk_qc_t cookie; unsigned int wb_acct; -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 2/5] blk-mq: fix potential race in queue restart and driver tag allocation

2017-01-26 Thread Jens Axboe
On 01/26/2017 12:48 PM, Jens Axboe wrote: > Once we mark the queue as needing a restart, re-check if we can > get a driver tag. This fixes a theoretical issue where the needed > IO completes _after_ blk_mq_get_driver_tag() fails, but before we > manage to set the restart bit. >

[GIT PULL] Block fixes for 4.10-rc

2017-01-27 Thread Jens Axboe
after free in __blkdev_direct_IO nvme-fc: use blk_rq_nr_phys_segments James Smart (1): nvmet_fc: correct logic in disconnect queue LS handling Jan Beulich (2): xen-blkfront: feature flags handling adjustments xen-blkfront: correct maximum segment accounting Jens Axboe (2):

Re: Device or HBA level QD throttling creates randomness in sequetial workload

2017-01-30 Thread Jens Axboe
ow to sleep inside the queuecommand() callback > function. udelay() is a busy loop, so it's not sleeping. That said, it's obviously NOT a great idea. We want to fix the reordering due to requeues, not introduce random busy delays to work around it. -- Jens Axboe -- To unsubscribe fro

Re: Device or HBA level QD throttling creates randomness in sequetial workload

2017-01-30 Thread Jens Axboe
On 01/30/2017 11:28 AM, Kashyap Desai wrote: >> -Original Message- >> From: Jens Axboe [mailto:ax...@kernel.dk] >> Sent: Monday, January 30, 2017 10:03 PM >> To: Bart Van Assche; osan...@osandov.com; kashyap.de...@broadcom.com >> Cc: linux-s...@vger.kernel.org

Re: [dm-devel] split scsi passthrough fields out of struct request V2

2017-01-30 Thread Jens Axboe
> On Jan 30, 2017, at 5:12 PM, Bart Van Assche <bart.vanass...@sandisk.com> > wrote: > >> On Fri, 2017-01-27 at 09:56 -0700, Jens Axboe wrote: >>> On 01/27/2017 09:52 AM, Bart Van Assche wrote: >>> [ 215.724452] general protection fault:

Re: [dm-devel] split scsi passthrough fields out of struct request V2

2017-01-30 Thread Jens Axboe
On 01/30/2017 05:38 PM, Jens Axboe wrote: > > >> On Jan 30, 2017, at 5:12 PM, Bart Van Assche <bart.vanass...@sandisk.com> >> wrote: >> >>> On Fri, 2017-01-27 at 09:56 -0700, Jens Axboe wrote: >>>> On 01/27/2017 09:52 AM, Bart Van Assche wrote:

Re: [PATCH v2] blk-mq: fix debugfs compilation issues

2017-01-27 Thread Jens Axboe
;all. > > Fix the stub definitions and add a CONFIG_BLK_DEBUG_FS Kconfig option. Thanks, added. -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 1/1] percpu-refcount: fix reference leak during percpu-atomic transition

2017-01-27 Thread Jens Axboe
(atomic_long_inc_not_zero(>count) != 0); > } Fix looks good to me, but let's drop the extraneous parentheses: ret = atomic_long_inc_not_zero(>count) != 0; in both spots. With that, you can add my Reviewed-by: Jens Axboe <ax...@fb.com> and let's fast-track this into 4.10. -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] queue stall with blk-mq-sched

2017-01-25 Thread Jens Axboe
On 01/25/2017 04:10 AM, Hannes Reinecke wrote: > On 01/25/2017 09:07 AM, Hannes Reinecke wrote: >> On 01/25/2017 08:39 AM, Hannes Reinecke wrote: >>> On 01/24/2017 11:06 PM, Jens Axboe wrote: >>>> On 01/24/2017 12:55 PM, Jens Axboe wrote: >>>

Re: [PATCH] queue stall with blk-mq-sched

2017-01-25 Thread Jens Axboe
On 01/25/2017 10:03 AM, Jens Axboe wrote: > On 01/25/2017 09:57 AM, Hannes Reinecke wrote: >> On 01/25/2017 04:52 PM, Jens Axboe wrote: >>> On 01/25/2017 04:10 AM, Hannes Reinecke wrote: >> [ .. ] >>>> Bah. >>>> >>>> Not quite. I'm s

Re: [PATCH 7/8] mq-deadline: add blk-mq adaptation of the deadline IO scheduler

2017-01-20 Thread Jens Axboe
On Fri, Jan 20 2017, Paolo Valente wrote: > > > Il giorno 20 gen 2017, alle ore 14:14, Paolo Valente > > <paolo.vale...@linaro.org> ha scritto: > > > >> > >> Il giorno 17 dic 2016, alle ore 01:12, Jens Axboe <ax...@fb.com> ha > >>

[GIT PULL] Block fixes for 4.10-rc

2017-01-20 Thread Jens Axboe
deletions(-) -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 4/5] blk-mq-sched: fix starvation for multiple hardware queues and shared tags

2017-01-26 Thread Jens Axboe
On 01/26/2017 01:25 PM, Omar Sandoval wrote: > On Thu, Jan 26, 2017 at 12:48:17PM -0700, Jens Axboe wrote: >> If we have both multiple hardware queues and shared tag map between >> devices, we need to ensure that we propagate the hardware queue >> restart bit higher up. This

Re: split scsi passthrough fields out of struct request V2

2017-01-26 Thread Jens Axboe
On 01/26/2017 11:59 AM, h...@lst.de wrote: > On Thu, Jan 26, 2017 at 11:57:36AM -0700, Jens Axboe wrote: >> It's against my for-4.11/block, which you were running under Christoph's >> patches. Maybe he's using an older version? In any case, should be >> pretty trivial for yo

Re: [PATCH 5/5] blk-mq-sched: change ->dispatch_requests() to ->dispatch_request()

2017-01-26 Thread Jens Axboe
On 01/26/2017 01:54 PM, Omar Sandoval wrote: > On Thu, Jan 26, 2017 at 12:48:18PM -0700, Jens Axboe wrote: >> When we invoke dispatch_requests(), the scheduler empties everything >> into the passed in list. This isn't always a good thing, since it >> means that we remove ite

Re: [dm-devel] split scsi passthrough fields out of struct request V2

2017-01-26 Thread Jens Axboe
On 01/26/2017 06:22 PM, Jens Axboe wrote: > On 01/26/2017 06:15 PM, Bart Van Assche wrote: >> On Thu, 2017-01-26 at 17:41 -0700, Jens Axboe wrote: >>> On 01/26/2017 05:38 PM, Bart Van Assche wrote: >>>> I see similar behavior with the blk-mq-sched branch of >>&g

Re: [dm-devel] split scsi passthrough fields out of struct request V2

2017-01-27 Thread Jens Axboe
On 01/26/2017 11:40 PM, Jens Axboe wrote: > On 01/26/2017 06:22 PM, Jens Axboe wrote: >> On 01/26/2017 06:15 PM, Bart Van Assche wrote: >>> On Thu, 2017-01-26 at 17:41 -0700, Jens Axboe wrote: >>>> On 01/26/2017 05:38 PM, Bart Van Assche wrote: >>>>>

Re: [PATCH 0/5] blk-mq: various blk-mq/blk-mq-sched fixes

2017-01-27 Thread Jens Axboe
On 01/27/2017 05:10 AM, Hannes Reinecke wrote: > On 01/26/2017 08:48 PM, Jens Axboe wrote: >> I've been diving into the problems that Hannes reported, both the >> stalls related to shared tag maps and multiple hardware queues, >> but also the cases where we g

Re: [PATCH v2 00/10] blk-mq: move debugging information from sysfs to debugfs

2017-01-27 Thread Jens Axboe
hat we often want but don't >have when debugging a live system. Thanks Omar, applied for 4.11. The series has already been helpful in root causing a stall. -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to maj

Re: split scsi passthrough fields out of struct request V2

2017-01-27 Thread Jens Axboe
mall cleanup in dm-rq I've queued this up for 4.11. Since some of the patches had dependencies on changes in master since for-4.11/block was forked, they are sitting in a separate branch that has both for-4.11/block and v4.10-rc5 pulled in first. for-next has everything, as usual. -- Jens Axb

Re: split scsi passthrough fields out of struct request V2

2017-01-27 Thread Jens Axboe
On 01/27/2017 09:23 AM, Christoph Hellwig wrote: > On Fri, Jan 27, 2017 at 09:21:46AM -0700, Jens Axboe wrote: >> On 01/27/2017 09:17 AM, Christoph Hellwig wrote: >>> On Fri, Jan 27, 2017 at 09:11:14AM -0700, Jens Axboe wrote: >>>> I've queued this up for 4.11.

Re: [dm-devel] split scsi passthrough fields out of struct request V2

2017-01-27 Thread Jens Axboe
On 01/27/2017 09:52 AM, Bart Van Assche wrote: > On Fri, 2017-01-27 at 01:04 -0700, Jens Axboe wrote: >> The previous patch had a bug if you didn't use a scheduler, here's a >> version that should work fine in both cases. I've also updated the >> above mentioned branch,

  1   2   3   4   5   6   7   8   9   10   >