Re: [PATCH 0/4 v2] BDI lifetime fix

2017-02-08 Thread Jan Kara
On Tue 07-02-17 12:21:01, Tejun Heo wrote: > Hello, > > On Tue, Feb 07, 2017 at 01:33:31PM +0100, Jan Kara wrote: > > > We can see above that inode->i_wb is in r31, and the machine crashed at > > > 0xc03799a0 so it was trying to dereference wb and crashed. > > > r31 is NULL in the crash i

Re: [PATCH 0/4 v2] BDI lifetime fix

2017-02-08 Thread Jan Kara
On Wed 08-02-17 08:51:42, Jan Kara wrote: > On Tue 07-02-17 12:21:01, Tejun Heo wrote: > > Hello, > > > > On Tue, Feb 07, 2017 at 01:33:31PM +0100, Jan Kara wrote: > > > > We can see above that inode->i_wb is in r31, and the machine crashed at > > > > 0xc03799a0 so it was trying to derefe

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

2017-02-08 Thread Dexuan Cui
> From: Jens Axboe [mailto:ax...@kernel.dk] > Sent: Wednesday, February 8, 2017 00:09 > To: Dexuan Cui ; Bart Van Assche > ; h...@suse.com; h...@suse.de > Cc: h...@lst.de; linux-ker...@vger.kernel.org; linux-block@vger.kernel.org; > j...@kernel.org > Subject: Re: [PATCH] genhd: Do not hold event lo

Re: [PATCH] bfq-mq: cause deadlock by executing exit_icq body immediately

2017-02-08 Thread Paolo Valente
> Il giorno 08 feb 2017, alle ore 11:33, Omar Sandoval ha > scritto: > > On Wed, Feb 08, 2017 at 11:03:01AM +0100, Paolo Valente wrote: >> >>> Il giorno 07 feb 2017, alle ore 22:45, Omar Sandoval >>> ha scritto: >>> >>> On Tue, Feb 07, 2017 at 06:33:46PM +0100, Paolo Valente wrote: Hi,

Re: [PATCH 3/4] block: optionally merge discontiguous discard bios into a single request

2017-02-08 Thread Ming Lei
On Wed, Feb 8, 2017 at 12:46 AM, Christoph Hellwig wrote: > Add a new merge strategy that merges discard bios into a request until the > maximum number of discard ranges (or the maximum discard size) is reached > from the plug merging code. I/O scheduler merging is not wired up yet > but might al

Re: [PATCH] bfq-mq: cause deadlock by executing exit_icq body immediately

2017-02-08 Thread Omar Sandoval
On Wed, Feb 08, 2017 at 11:03:01AM +0100, Paolo Valente wrote: > > > Il giorno 07 feb 2017, alle ore 22:45, Omar Sandoval > > ha scritto: > > > > On Tue, Feb 07, 2017 at 06:33:46PM +0100, Paolo Valente wrote: > >> Hi, > >> this patch is meant to show that, if the body of the hook exit_icq is

Re: [PATCH] bfq-mq: cause deadlock by executing exit_icq body immediately

2017-02-08 Thread Paolo Valente
> Il giorno 07 feb 2017, alle ore 22:45, Omar Sandoval ha > scritto: > > On Tue, Feb 07, 2017 at 06:33:46PM +0100, Paolo Valente wrote: >> Hi, >> this patch is meant to show that, if the body of the hook exit_icq is >> executed >> from inside that hook, and not as deferred work, then a circul

Re: [PATCH 22/24] ubifs: Convert to separately allocated bdi

2017-02-08 Thread Richard Weinberger
Am 02.02.2017 um 18:34 schrieb Jan Kara: > Allocate struct backing_dev_info separately instead of embedding it > inside the superblock. This unifies handling of bdi among users. > > CC: Richard Weinberger > CC: Artem Bityutskiy > CC: Adrian Hunter > CC: linux-...@lists.infradead.org > Signed-of

[PATCH 1/4] block: move req_set_nomerge to blk.h

2017-02-08 Thread Christoph Hellwig
This makes it available outside of blk-merge.c, and inlining such a trivial helper seems pretty useful to start with. Signed-off-by: Christoph Hellwig --- block/blk-merge.c | 7 --- block/blk.h | 7 +++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/block/blk-merge.

[PATCH 2/4] block: enumify ELEVATOR_*_MERGE

2017-02-08 Thread Christoph Hellwig
Switch these constants to an enum, and make let the compiler ensure that all callers of blk_try_merge and elv_merge handle all potential values. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 76 +--- block/blk-merge.c| 2 +-

support for multi-range discard requests V2

2017-02-08 Thread Christoph Hellwig
Hi all, this series adds support for merging discontiguous discard bios into a single request if the driver supports it. This reduces the number of discards sent to the device by about a factor of 5-6 for typical workloads on NVMe, and for slower devices that use I/O scheduling the number will pr

[PATCH 3/4] block: optionally merge discontiguous discard bios into a single request

2017-02-08 Thread Christoph Hellwig
Add a new merge strategy that merges discard bios into a request until the maximum number of discard ranges (or the maximum discard size) is reached from the plug merging code. I/O scheduler merging is not wired up yet but might also be useful, although not for fast devices like NVMe which are the

[PATCH 4/4] nvme: support ranged discard requests

2017-02-08 Thread Christoph Hellwig
NVMe supports up to 255 ranges per DSM command, so wire up support for ranged discards up to that limit. Signed-off-by: Christoph Hellwig --- drivers/nvme/host/core.c | 28 +--- include/linux/nvme.h | 2 ++ 2 files changed, 23 insertions(+), 7 deletions(-) diff --gi

Re: 4.10 lockdep: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected

2017-02-08 Thread Konstantin Khlebnikov
Looks like this caused by del_timer_sync() in wbt_disable_default() under irq-safe lock. Here void wbt_disable_default(struct request_queue *q) { struct rq_wb *rwb = q->rq_wb; if (rwb && rwb->enable_state == WBT_STATE_ON_DEFAULT) { del_timer_sync(&rwb->window_ti

Re: [PATCH 4/4] nvme: support ranged discard requests

2017-02-08 Thread Christoph Hellwig
On Wed, Feb 08, 2017 at 01:32:22PM +, Andrey Kuzmin wrote: > On Wed, Feb 8, 2017, 16:14 Christoph Hellwig wrote: > > > NVMe supports up to 255 ranges per DSM command, > > > 256 per spec, with number of ranges being zero-based. You're right. I'll do another round of the patch. That beeing

[PATCH 4/4] nvme: support ranged discard requests

2017-02-08 Thread Christoph Hellwig
NVMe supports up to 256 ranges per DSM command, so wire up support for ranged discards up to that limit. Signed-off-by: Christoph Hellwig --- drivers/nvme/host/core.c | 30 +++--- include/linux/nvme.h | 2 ++ 2 files changed, 25 insertions(+), 7 deletions(-) diff --

Re: [PATCH 3/4] block: optionally merge discontiguous discard bios into a single request

2017-02-08 Thread Christoph Hellwig
On Wed, Feb 08, 2017 at 06:54:24PM +0800, Ming Lei wrote: > > + struct bio *bio) > > +{ > > + unsigned short segments = blk_rq_nr_discard_segments(req); > > + > > + if (segments >= queue_max_discard_segments(q)) > > + goto no_merge; > > + if (blk_rq_sec

[PATCH 1/4] block: move req_set_nomerge to blk.h

2017-02-08 Thread Christoph Hellwig
This makes it available outside of blk-merge.c, and inlining such a trivial helper seems pretty useful to start with. Signed-off-by: Christoph Hellwig --- block/blk-merge.c | 7 --- block/blk.h | 7 +++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/block/blk-merge.

support for multi-range discard requests V3

2017-02-08 Thread Christoph Hellwig
Hi all, this series adds support for merging discontiguous discard bios into a single request if the driver supports it. This reduces the number of discards sent to the device by about a factor of 5-6 for typical workloads on NVMe, and for slower devices that use I/O scheduling the number will pr

[PATCH 3/4] block: optionally merge discontiguous discard bios into a single request

2017-02-08 Thread Christoph Hellwig
Add a new merge strategy that merges discard bios into a request until the maximum number of discard ranges (or the maximum discard size) is reached from the plug merging code. I/O scheduler merging is not wired up yet but might also be useful, although not for fast devices like NVMe which are the

Re: [PATCH 08/24] btrfs: Convert to separately allocated bdi

2017-02-08 Thread David Sterba
On Thu, Feb 02, 2017 at 06:34:06PM +0100, Jan Kara wrote: > Allocate struct backing_dev_info separately instead of embedding it > inside superblock. This unifies handling of bdi among users. > > CC: Chris Mason > CC: Josef Bacik > CC: David Sterba > CC: linux-bt...@vger.kernel.org > Signed-off-

[PATCH 2/4] block: enumify ELEVATOR_*_MERGE

2017-02-08 Thread Christoph Hellwig
Switch these constants to an enum, and make let the compiler ensure that all callers of blk_try_merge and elv_merge handle all potential values. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 76 +--- block/blk-merge.c| 2 +-

Re: [PATCH 0/4 v2] BDI lifetime fix

2017-02-08 Thread Dan Williams
On Wed, Feb 8, 2017 at 2:23 AM, Jan Kara wrote: > On Wed 08-02-17 08:51:42, Jan Kara wrote: [..] > > This ordering seems to be the real culprit of the bdi name reuse problems > Omar has reported? Same as described in commit 6cd18e711dd8 for MD BTW and > Dan's patch could be IMHO replaced by a mov

[PATCH V2] nbd: ref count the socks array

2017-02-08 Thread Josef Bacik
In preparation for allowing seamless reconnects we need a way to make sure that we don't free the socks array out from underneath ourselves. So a socks_ref counter in order to keep track of who is using the socks array, and only free it and change num_connections once our reference reduces to zero.

Re: v4.9, 4.4-final: 28 bioset threads on small notebook, 36 threads on cellphone

2017-02-08 Thread Mike Snitzer
On Tue, Feb 07 2017 at 11:58pm -0500, Kent Overstreet wrote: > On Tue, Feb 07, 2017 at 09:39:11PM +0100, Pavel Machek wrote: > > On Mon 2017-02-06 17:49:06, Kent Overstreet wrote: > > > On Mon, Feb 06, 2017 at 04:47:24PM -0900, Kent Overstreet wrote: > > > > On Mon, Feb 06, 2017 at 01:53:09PM +01

Re: [PATCH] bfq-mq: cause deadlock by executing exit_icq body immediately

2017-02-08 Thread Omar Sandoval
On Wed, Feb 08, 2017 at 11:39:24AM +0100, Paolo Valente wrote: > > > Il giorno 08 feb 2017, alle ore 11:33, Omar Sandoval > > ha scritto: > > > > On Wed, Feb 08, 2017 at 11:03:01AM +0100, Paolo Valente wrote: > >> > >>> Il giorno 07 feb 2017, alle ore 22:45, Omar Sandoval > >>> ha scritto: >

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 ; Bart Van Assche >> ; h...@suse.com; h...@suse.de >> Cc: h...@lst.de; linux-ker...@vger.kernel.org; linux-block@vger.kernel.org; >> j...@kernel.org >>

Re: support for multi-range discard requests V3

2017-02-08 Thread Jens Axboe
On 02/08/2017 06:46 AM, Christoph Hellwig wrote: > Hi all, > > this series adds support for merging discontiguous discard bios into a > single request if the driver supports it. This reduces the number of > discards sent to the device by about a factor of 5-6 for typical > workloads on NVMe, and

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

2017-02-08 Thread h...@lst.de
On Wed, Feb 08, 2017 at 10:43:59AM -0700, Jens Axboe wrote: > I've changed the subject line, this issue has nothing to do with the > issue that Hannes was attempting to fix. Nothing really useful in the thread. Dexuan, can you throw in some prints to see which command times out?

[PATCH] block: sed-opal: reduce stack size of ioctl handler

2017-02-08 Thread Arnd Bergmann
When CONFIG_KASAN is in use, the sed_ioctl function uses unusually large stack, as each possible ioctl argument gets its own stack area plus redzone: block/sed-opal.c: In function 'sed_ioctl': block/sed-opal.c:2447:1: error: the frame size of 2256 bytes is larger than 2048 bytes [-Werror=frame-la

Re: [PATCH] block: sed-opal: reduce stack size of ioctl handler

2017-02-08 Thread Scott Bauer
On Wed, Feb 08, 2017 at 10:15:28PM +0100, Arnd Bergmann wrote: > When CONFIG_KASAN is in use, the sed_ioctl function uses unusually large > stack, > as each possible ioctl argument gets its own stack area plus redzone: > > block/sed-opal.c: In function 'sed_ioctl': > block/sed-opal.c:2447:1: erro

Re: [PATCH] block: sed-opal: reduce stack size of ioctl handler

2017-02-08 Thread Scott Bauer
On Wed, Feb 08, 2017 at 02:58:28PM -0700, Scott Bauer wrote: > On Wed, Feb 08, 2017 at 10:15:28PM +0100, Arnd Bergmann wrote: > > When CONFIG_KASAN is in use, the sed_ioctl function uses unusually large > > stack, > > as each possible ioctl argument gets its own stack area plus redzone: > > > > b

[PATCH v2] Move stack parameters for sed_ioctl to prevent oversized stack with CONFIG_KASAN

2017-02-08 Thread Scott Bauer
When CONFIG_KASAN is enabled, compilation fails: block/sed-opal.c: In function 'sed_ioctl': block/sed-opal.c:2447:1: error: the frame size of 2256 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] Moved all the ioctl structures off the stack to a static union to prevent oversized stac

[PATCH] Move stack parameters for sed_ioctl to prevent oversized stack with CONFIG_KASAN

2017-02-08 Thread Scott Bauer
When CONFIG_KASAN is enabled, compilation fails: block/sed-opal.c: In function 'sed_ioctl': block/sed-opal.c:2447:1: error: the frame size of 2256 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] Moved all the ioctl structures off the stack to a static union to prevent oversized stac

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

2017-02-08 Thread James Bottomley
On Mon, 2017-02-06 at 21:42 -0800, Dan Williams wrote: > On Mon, Feb 6, 2017 at 8:09 PM, Jens Axboe wrote: > > On 02/06/2017 05:14 PM, James Bottomley wrote: > > > On Sun, 2017-02-05 at 21:13 -0800, Dan Williams wrote: > > > > On Sun, Feb 5, 2017 at 1:13 AM, Christoph Hellwig > > > > wrote: > > >

Re: [PATCHv6 01/37] mm, shmem: swich huge tmpfs to multi-order radix-tree entries

2017-02-08 Thread Matthew Wilcox
On Thu, Jan 26, 2017 at 02:57:43PM +0300, Kirill A. Shutemov wrote: > +++ b/include/linux/pagemap.h > @@ -332,6 +332,15 @@ static inline struct page *grab_cache_page_nowait(struct > address_space *mapping, > mapping_gfp_mask(mapping)); > } > > +static inline struct page *f

Re: [PATCHv6 03/37] page-flags: relax page flag policy for few flags

2017-02-08 Thread Matthew Wilcox
On Thu, Jan 26, 2017 at 02:57:45PM +0300, Kirill A. Shutemov wrote: > These flags are in use for filesystems with backing storage: PG_error, > PG_writeback and PG_readahead. Oh ;-) Then I amend my comment on patch 1 to be "patch 3 needs to go ahead of patch 1" ;-) > Signed-off-by: Kirill A. Shut

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

2017-02-08 Thread Dexuan Cui
> From: h...@lst.de [mailto:h...@lst.de] > Sent: Thursday, February 9, 2017 02:03 > To: Jens Axboe > Cc: Dexuan Cui ; Bart Van Assche > ; h...@suse.com; h...@suse.de; Martin K. > Petersen ; h...@lst.de; linux- > ker...@vger.kernel.org; linux-block@vger.kernel.org; j...@kernel.org > Subject: Re: Bo