Re: [PATCH v6 05/11] block: remove split code in blkdev_issue_{discard,write_same}

2015-10-22 Thread Christoph Hellwig
On Thu, Oct 22, 2015 at 03:24:44AM -0700, Christoph Hellwig wrote: > > How about below? > > It actually reverts commit b49a0871 and adds patch at > > https://www.redhat.com/archives/dm-devel/2015-August/msg0.html > > > > Christoph, could you help to try it? > > Still causes hickups with my co

Re: [PATCH v6 05/11] block: remove split code in blkdev_issue_{discard,write_same}

2015-10-22 Thread Christoph Hellwig
On Wed, Oct 21, 2015 at 01:13:09PM -0700, Ming Lin wrote: > How about below? > It actually reverts commit b49a0871 and adds patch at > https://www.redhat.com/archives/dm-devel/2015-August/msg0.html > > Christoph, could you help to try it? Still causes hickups with my controller unfortunately.

Re: [PATCH v6 05/11] block: remove split code in blkdev_issue_{discard,write_same}

2015-10-21 Thread Ming Lin
On Wed, 2015-10-21 at 14:18 -0400, Mike Snitzer wrote: > On Wed, Oct 21 2015 at 1:33pm -0400, > Ming Lin wrote: > > > On Wed, 2015-10-21 at 12:19 -0400, Mike Snitzer wrote: > > > On Wed, Oct 21 2015 at 12:02pm -0400, > > > Mike Snitzer wrote: > > > > > > > On Wed, Oct 14 2015 at 9:27am -0400,

Re: [PATCH v6 05/11] block: remove split code in blkdev_issue_{discard,write_same}

2015-10-21 Thread Mike Snitzer
On Wed, Oct 21 2015 at 1:33pm -0400, Ming Lin wrote: > On Wed, 2015-10-21 at 12:19 -0400, Mike Snitzer wrote: > > On Wed, Oct 21 2015 at 12:02pm -0400, > > Mike Snitzer wrote: > > > > > On Wed, Oct 14 2015 at 9:27am -0400, > > > Christoph Hellwig wrote: > > > > > > > On Tue, Oct 13, 2015 at

Re: [PATCH v6 05/11] block: remove split code in blkdev_issue_{discard,write_same}

2015-10-21 Thread Ming Lin
On Wed, 2015-10-21 at 12:19 -0400, Mike Snitzer wrote: > On Wed, Oct 21 2015 at 12:02pm -0400, > Mike Snitzer wrote: > > > On Wed, Oct 14 2015 at 9:27am -0400, > > Christoph Hellwig wrote: > > > > > On Tue, Oct 13, 2015 at 10:44:11AM -0700, Ming Lin wrote: > > > > I just did a quick test with

Re: [PATCH v6 05/11] block: remove split code in blkdev_issue_{discard,write_same}

2015-10-21 Thread Ming Lin
On Wed, 2015-10-21 at 11:33 -0400, Mike Snitzer wrote: > On Wed, Oct 21 2015 at 11:01am -0400, > Ming Lin wrote: > > > On Wed, 2015-10-21 at 09:39 -0400, Jeff Moyer wrote: > > > Christoph Hellwig writes: > > > > > > > Jens, Ming: > > > > > > > > are you fine with the one liner change to get bac

Re: [PATCH v6 05/11] block: remove split code in blkdev_issue_{discard,write_same}

2015-10-21 Thread Martin K. Petersen
> "Mike" == Mike Snitzer writes: >> That should work for all devices and for dm-thinp (and dm-cache) in >> particular will ensure that all discards that are issued will be a >> multiple of the underlying device's blocksize. Mike> Jeff Moyer pointed out having req_sects be a factor of Mike> d

Re: [PATCH v6 05/11] block: remove split code in blkdev_issue_{discard,write_same}

2015-10-21 Thread Mike Snitzer
On Wed, Oct 21 2015 at 12:02pm -0400, Mike Snitzer wrote: > On Wed, Oct 14 2015 at 9:27am -0400, > Christoph Hellwig wrote: > > > On Tue, Oct 13, 2015 at 10:44:11AM -0700, Ming Lin wrote: > > > I just did a quick test with a Samsung 900G NVMe device. > > > mkfs.xfs is OK on 4.3-rc5. > > > > >

Re: [PATCH v6 05/11] block: remove split code in blkdev_issue_{discard,write_same}

2015-10-21 Thread Mike Snitzer
On Wed, Oct 14 2015 at 9:27am -0400, Christoph Hellwig wrote: > On Tue, Oct 13, 2015 at 10:44:11AM -0700, Ming Lin wrote: > > I just did a quick test with a Samsung 900G NVMe device. > > mkfs.xfs is OK on 4.3-rc5. > > > > What's your device model? I may find a similar one to try. > > This is a

Re: [PATCH v6 05/11] block: remove split code in blkdev_issue_{discard,write_same}

2015-10-21 Thread Mike Snitzer
On Wed, Oct 21 2015 at 11:01am -0400, Ming Lin wrote: > On Wed, 2015-10-21 at 09:39 -0400, Jeff Moyer wrote: > > Christoph Hellwig writes: > > > > > Jens, Ming: > > > > > > are you fine with the one liner change to get back to the old I/O > > > pattern? While it looks like the cards fault I'd

Re: [PATCH v6 05/11] block: remove split code in blkdev_issue_{discard,write_same}

2015-10-21 Thread Ming Lin
On Wed, 2015-10-21 at 09:39 -0400, Jeff Moyer wrote: > Christoph Hellwig writes: > > > Jens, Ming: > > > > are you fine with the one liner change to get back to the old I/O > > pattern? While it looks like the cards fault I'd like to avoid this > > annoying regression. > > I'm not Jens or Ming,

Re: [PATCH v6 05/11] block: remove split code in blkdev_issue_{discard,write_same}

2015-10-21 Thread Jeff Moyer
Christoph Hellwig writes: > Jens, Ming: > > are you fine with the one liner change to get back to the old I/O > pattern? While it looks like the cards fault I'd like to avoid this > annoying regression. I'm not Jens or Ming, but your patch looks fine to me, though you'll want to remove the MAX_

Re: [PATCH v6 05/11] block: remove split code in blkdev_issue_{discard,write_same}

2015-10-21 Thread Christoph Hellwig
Jens, Ming: are you fine with the one liner change to get back to the old I/O pattern? While it looks like the cards fault I'd like to avoid this annoying regression. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org M

Re: [PATCH v6 05/11] block: remove split code in blkdev_issue_{discard,write_same}B

2015-10-14 Thread Christoph Hellwig
On Wed, Oct 14, 2015 at 04:38:50PM +, Keith Busch wrote: > I see why the proposal is an improvement, but I don't understand why the > current situation results in a hang. Are we missing some kind of error > recovery in the driver? The driver tries to abort the commands and eventually gets into

Re: [PATCH v6 05/11] block: remove split code in blkdev_issue_{discard,write_same}B

2015-10-14 Thread Keith Busch
On Wed, 14 Oct 2015, Christoph Hellwig wrote: Analsys and tentativ fix below: blktrace for before the commit: 259,012 0.02543 2394 G D 0 + 8388607 [mkfs.xfs] 259,013 0.08230 2394 I D 0 + 8388607 [mkfs.xfs] 259,014 0.31090 207

Re: [PATCH v6 05/11] block: remove split code in blkdev_issue_{discard,write_same}

2015-10-14 Thread Christoph Hellwig
On Tue, Oct 13, 2015 at 10:44:11AM -0700, Ming Lin wrote: > I just did a quick test with a Samsung 900G NVMe device. > mkfs.xfs is OK on 4.3-rc5. > > What's your device model? I may find a similar one to try. This is a HGST Ultrastar SN100 Analsys and tentativ fix below: blktrace for before the

Re: [PATCH v6 05/11] block: remove split code in blkdev_issue_{discard,write_same}

2015-10-13 Thread Ming Lin
On Tue, Oct 13, 2015 at 4:50 AM, Christoph Hellwig wrote: > On Wed, Aug 12, 2015 at 12:07:15AM -0700, Ming Lin wrote: >> From: Ming Lin >> >> The split code in blkdev_issue_{discard,write_same} can go away >> now that any driver that cares does the split. We have to make >> sure bio size doesn't

Re: [PATCH v6 05/11] block: remove split code in blkdev_issue_{discard,write_same}

2015-10-13 Thread Christoph Hellwig
On Wed, Aug 12, 2015 at 12:07:15AM -0700, Ming Lin wrote: > From: Ming Lin > > The split code in blkdev_issue_{discard,write_same} can go away > now that any driver that cares does the split. We have to make > sure bio size doesn't overflow. > > For discard, we set max discard sectors to (1<<31)

[PATCH v6 05/11] block: remove split code in blkdev_issue_{discard,write_same}

2015-08-12 Thread Ming Lin
From: Ming Lin The split code in blkdev_issue_{discard,write_same} can go away now that any driver that cares does the split. We have to make sure bio size doesn't overflow. For discard, we set max discard sectors to (1<<31)>>9 to ensure it doesn't overflow bi_size and hopefully it is of the pro