Re: [dm-devel] [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-13 Thread Hannes Reinecke
On 08/08/2015 11:02 AM, Kent Overstreet wrote: > On Sat, Aug 08, 2015 at 10:52:24AM +0200, Hannes Reinecke wrote: >> Wouldn't it be easier to move both max_write_same_sectors and >> max_discard sectors to 64 bit (ie to type sector_t) and be done with the >> overflow? >> Seems to me this is far too

Re: [dm-devel] [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-13 Thread Hannes Reinecke
On 08/08/2015 11:02 AM, Kent Overstreet wrote: On Sat, Aug 08, 2015 at 10:52:24AM +0200, Hannes Reinecke wrote: Wouldn't it be easier to move both max_write_same_sectors and max_discard sectors to 64 bit (ie to type sector_t) and be done with the overflow? Seems to me this is far too much

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-11 Thread Ming Lin
On Tue, 2015-08-11 at 20:24 -0400, Martin K. Petersen wrote: > > "Ming" == Ming Lin writes: > > Ming> Do you still agree we cap discard to 2G as an interim solution? > > I can live with the 2G cap for 4.3 but would like to see it fixed > properly in 4.4. Sure. I'd like to work on the fix.

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-11 Thread Martin K. Petersen
> "Ming" == Ming Lin writes: Ming> Do you still agree we cap discard to 2G as an interim solution? I can live with the 2G cap for 4.3 but would like to see it fixed properly in 4.4. -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-11 Thread Ming Lin
On Tue, 2015-08-11 at 14:05 -0400, Martin K. Petersen wrote: > > "Martin" == Martin K Petersen writes: > > Martin> I agree except I really don't want to lop off anything unless > Martin> the device locks up if we send it partial blocks. There was an > Martin> array that had problems a while

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-11 Thread Martin K. Petersen
> "Martin" == Martin K Petersen writes: Martin> I agree except I really don't want to lop off anything unless Martin> the device locks up if we send it partial blocks. There was an Martin> array that had problems a while back but I believe they have Martin> been fixed. Oh, and there are

Re: [dm-devel] [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-11 Thread Martin K. Petersen
> "Mike" == Mike Snitzer writes: Mike> That is the benefit. And when coupled with the new default Mike> max_discard of 64K (pending change from Jens for 4.3) this 2GB Mike> upper limit really isn't such a big deal. Unless I'm missing Mike> something... 2GB is fine for current SATA due to

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-11 Thread Martin K. Petersen
> "Kent" == Kent Overstreet writes: Kent> This kind of logic really doesn't belong in dm Well it does in this case since the thinp personality actually provisions and unprovisions space. But there is a difference between what dm thinp acts on for its own internal provisioning purposes and

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-11 Thread Mike Snitzer
On Tue, Aug 11 2015 at 1:36pm -0400, Martin K. Petersen wrote: > > "Mike" == Mike Snitzer writes: > > Mike> DM-thinp processes discards internally before it passes them down > Mike> (if configured to do so). If a discard is smaller than the > Mike> granularity of a thinp block (whose

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-11 Thread Martin K. Petersen
> "Mike" == Mike Snitzer writes: Mike> DM-thinp processes discards internally before it passes them down Mike> (if configured to do so). If a discard is smaller than the Mike> granularity of a thinp block (whose size is configurable) or if Mike> the start and end of the discard's extent is

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-11 Thread Mike Snitzer
On Mon, Aug 10 2015 at 11:38pm -0400, Kent Overstreet wrote: > On Mon, Aug 10, 2015 at 10:41:55PM -0400, Mike Snitzer wrote: > > On Mon, Aug 10 2015 at 10:00pm -0400, > > Martin K. Petersen wrote: > > > > > > "Ming" == Ming Lin writes: > > > > > > Ming> Did you mean still use (UINT_MAX

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-11 Thread Ming Lin
On Tue, 2015-08-11 at 14:05 -0400, Martin K. Petersen wrote: Martin == Martin K Petersen martin.peter...@oracle.com writes: Martin I agree except I really don't want to lop off anything unless Martin the device locks up if we send it partial blocks. There was an Martin array that had

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-11 Thread Mike Snitzer
On Mon, Aug 10 2015 at 11:38pm -0400, Kent Overstreet kent.overstr...@gmail.com wrote: On Mon, Aug 10, 2015 at 10:41:55PM -0400, Mike Snitzer wrote: On Mon, Aug 10 2015 at 10:00pm -0400, Martin K. Petersen martin.peter...@oracle.com wrote: Ming == Ming Lin m...@kernel.org writes:

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-11 Thread Mike Snitzer
On Tue, Aug 11 2015 at 1:36pm -0400, Martin K. Petersen martin.peter...@oracle.com wrote: Mike == Mike Snitzer snit...@redhat.com writes: Mike DM-thinp processes discards internally before it passes them down Mike (if configured to do so). If a discard is smaller than the Mike

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-11 Thread Martin K. Petersen
Martin == Martin K Petersen martin.peter...@oracle.com writes: Martin I agree except I really don't want to lop off anything unless Martin the device locks up if we send it partial blocks. There was an Martin array that had problems a while back but I believe they have Martin been fixed. Oh,

Re: [dm-devel] [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-11 Thread Martin K. Petersen
Mike == Mike Snitzer snit...@redhat.com writes: Mike That is the benefit. And when coupled with the new default Mike max_discard of 64K (pending change from Jens for 4.3) this 2GB Mike upper limit really isn't such a big deal. Unless I'm missing Mike something... 2GB is fine for current SATA

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-11 Thread Martin K. Petersen
Mike == Mike Snitzer snit...@redhat.com writes: Mike DM-thinp processes discards internally before it passes them down Mike (if configured to do so). If a discard is smaller than the Mike granularity of a thinp block (whose size is configurable) or if Mike the start and end of the discard's

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-11 Thread Martin K. Petersen
Kent == Kent Overstreet kent.overstr...@gmail.com writes: Kent This kind of logic really doesn't belong in dm Well it does in this case since the thinp personality actually provisions and unprovisions space. But there is a difference between what dm thinp acts on for its own internal

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-11 Thread Martin K. Petersen
Ming == Ming Lin m...@kernel.org writes: Ming Do you still agree we cap discard to 2G as an interim solution? I can live with the 2G cap for 4.3 but would like to see it fixed properly in 4.4. -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-11 Thread Ming Lin
On Tue, 2015-08-11 at 20:24 -0400, Martin K. Petersen wrote: Ming == Ming Lin m...@kernel.org writes: Ming Do you still agree we cap discard to 2G as an interim solution? I can live with the 2G cap for 4.3 but would like to see it fixed properly in 4.4. Sure. I'd like to work on the fix.

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-10 Thread Kent Overstreet
On Mon, Aug 10, 2015 at 10:41:55PM -0400, Mike Snitzer wrote: > On Mon, Aug 10 2015 at 10:00pm -0400, > Martin K. Petersen wrote: > > > > "Ming" == Ming Lin writes: > > > > Ming> Did you mean still use (UINT_MAX >> 9) in blkdev_issue_discard()? > > > > Ming> But that doesn't work for

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-10 Thread Mike Snitzer
On Mon, Aug 10 2015 at 10:00pm -0400, Martin K. Petersen wrote: > > "Ming" == Ming Lin writes: > > Ming> Did you mean still use (UINT_MAX >> 9) in blkdev_issue_discard()? > > Ming> But that doesn't work for dm-thinp. See Kent's suggestion to use > Ming> 1<<31. > > I'm not sure why things

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-10 Thread Martin K. Petersen
> "Ming" == Ming Lin writes: Ming> Did you mean still use (UINT_MAX >> 9) in blkdev_issue_discard()? Ming> But that doesn't work for dm-thinp. See Kent's suggestion to use Ming> 1<<31. I'm not sure why things are not working for dm-thinp. Presumably Kent's code would split the discard at a

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-10 Thread Ming Lin
On Mon, Aug 10, 2015 at 11:13 AM, Mike Snitzer wrote: > On Mon, Aug 10 2015 at 12:14pm -0400, > Ming Lin wrote: > >> On Mon, 2015-08-10 at 11:02 -0400, Mike Snitzer wrote: >> > >> > Aside from that, I'm in favor of seeing this late bio splitting patchset >> > finally land upstream (hopefully in

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-10 Thread Ming Lin
On Mon, 2015-08-10 at 12:22 -0400, Martin K. Petersen wrote: > > "Mike" == Mike Snitzer writes: > > Mike> Shouldn't we also be using MAX_BIO_SECTORS in > Mike> blkdev_issue_write_same (instead of UINT_MAX >> 9)? > > The granularity of WRITE SAME is always 1 logical block and there is no >

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-10 Thread Mike Snitzer
On Mon, Aug 10 2015 at 12:14pm -0400, Ming Lin wrote: > On Mon, 2015-08-10 at 11:02 -0400, Mike Snitzer wrote: > > > > Aside from that, I'm in favor of seeing this late bio splitting patchset > > finally land upstream (hopefully in time for the 4.3 merge, Jens?): > > > > Acked-by: Mike Snitzer

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-10 Thread Martin K. Petersen
> "Ming" == Ming Lin writes: Ming, Ming> I also prefer using MAX_BIO_SECTORS. Otherwise, we may have non Ming> page size aligned splits. This does not matter for write same and discard since there is only a single logical block of payload. Also, given limitations in SATA we're always

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-10 Thread Martin K. Petersen
> "Mike" == Mike Snitzer writes: Mike> Shouldn't we also be using MAX_BIO_SECTORS in Mike> blkdev_issue_write_same (instead of UINT_MAX >> 9)? The granularity of WRITE SAME is always 1 logical block and there is no reason to round it down to the next power of two. +/* + * Ensure that max

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-10 Thread Ming Lin
On Mon, 2015-08-10 at 09:14 -0700, Ming Lin wrote: > On Mon, 2015-08-10 at 11:02 -0400, Mike Snitzer wrote: > > On Sun, Aug 09 2015 at 3:18am -0400, > > Ming Lin wrote: > > > > > On Sun, 2015-08-09 at 00:01 -0700, Christoph Hellwig wrote: > > > > On Sat, Aug 08, 2015 at 11:55:47PM -0700, Ming

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-10 Thread Ming Lin
On Mon, 2015-08-10 at 11:02 -0400, Mike Snitzer wrote: > On Sun, Aug 09 2015 at 3:18am -0400, > Ming Lin wrote: > > > On Sun, 2015-08-09 at 00:01 -0700, Christoph Hellwig wrote: > > > On Sat, Aug 08, 2015 at 11:55:47PM -0700, Ming Lin wrote: > > > > Will change it to MAX_BIO_SECTORS. > > > >

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-10 Thread Mike Snitzer
On Sun, Aug 09 2015 at 3:18am -0400, Ming Lin wrote: > On Sun, 2015-08-09 at 00:01 -0700, Christoph Hellwig wrote: > > On Sat, Aug 08, 2015 at 11:55:47PM -0700, Ming Lin wrote: > > > Will change it to MAX_BIO_SECTORS. > > > May I add your ACK? > > > > Yes, please go ahead. > > Thanks. I'll

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-10 Thread Ming Lin
On Mon, 2015-08-10 at 09:14 -0700, Ming Lin wrote: On Mon, 2015-08-10 at 11:02 -0400, Mike Snitzer wrote: On Sun, Aug 09 2015 at 3:18am -0400, Ming Lin m...@kernel.org wrote: On Sun, 2015-08-09 at 00:01 -0700, Christoph Hellwig wrote: On Sat, Aug 08, 2015 at 11:55:47PM -0700, Ming

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-10 Thread Mike Snitzer
On Sun, Aug 09 2015 at 3:18am -0400, Ming Lin m...@kernel.org wrote: On Sun, 2015-08-09 at 00:01 -0700, Christoph Hellwig wrote: On Sat, Aug 08, 2015 at 11:55:47PM -0700, Ming Lin wrote: Will change it to MAX_BIO_SECTORS. May I add your ACK? Yes, please go ahead. Thanks. I'll

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-10 Thread Ming Lin
On Mon, 2015-08-10 at 11:02 -0400, Mike Snitzer wrote: On Sun, Aug 09 2015 at 3:18am -0400, Ming Lin m...@kernel.org wrote: On Sun, 2015-08-09 at 00:01 -0700, Christoph Hellwig wrote: On Sat, Aug 08, 2015 at 11:55:47PM -0700, Ming Lin wrote: Will change it to MAX_BIO_SECTORS. May

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-10 Thread Martin K. Petersen
Mike == Mike Snitzer snit...@redhat.com writes: Mike Shouldn't we also be using MAX_BIO_SECTORS in Mike blkdev_issue_write_same (instead of UINT_MAX 9)? The granularity of WRITE SAME is always 1 logical block and there is no reason to round it down to the next power of two. +/* + * Ensure

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-10 Thread Mike Snitzer
On Mon, Aug 10 2015 at 12:14pm -0400, Ming Lin m...@kernel.org wrote: On Mon, 2015-08-10 at 11:02 -0400, Mike Snitzer wrote: Aside from that, I'm in favor of seeing this late bio splitting patchset finally land upstream (hopefully in time for the 4.3 merge, Jens?): Acked-by: Mike

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-10 Thread Ming Lin
On Mon, 2015-08-10 at 12:22 -0400, Martin K. Petersen wrote: Mike == Mike Snitzer snit...@redhat.com writes: Mike Shouldn't we also be using MAX_BIO_SECTORS in Mike blkdev_issue_write_same (instead of UINT_MAX 9)? The granularity of WRITE SAME is always 1 logical block and there is no

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-10 Thread Martin K. Petersen
Ming == Ming Lin m...@kernel.org writes: Ming, Ming I also prefer using MAX_BIO_SECTORS. Otherwise, we may have non Ming page size aligned splits. This does not matter for write same and discard since there is only a single logical block of payload. Also, given limitations in SATA we're

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-10 Thread Ming Lin
On Mon, Aug 10, 2015 at 11:13 AM, Mike Snitzer snit...@redhat.com wrote: On Mon, Aug 10 2015 at 12:14pm -0400, Ming Lin m...@kernel.org wrote: On Mon, 2015-08-10 at 11:02 -0400, Mike Snitzer wrote: Aside from that, I'm in favor of seeing this late bio splitting patchset finally land

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-10 Thread Kent Overstreet
On Mon, Aug 10, 2015 at 10:41:55PM -0400, Mike Snitzer wrote: On Mon, Aug 10 2015 at 10:00pm -0400, Martin K. Petersen martin.peter...@oracle.com wrote: Ming == Ming Lin m...@kernel.org writes: Ming Did you mean still use (UINT_MAX 9) in blkdev_issue_discard()? Ming But that

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-10 Thread Martin K. Petersen
Ming == Ming Lin m...@kernel.org writes: Ming Did you mean still use (UINT_MAX 9) in blkdev_issue_discard()? Ming But that doesn't work for dm-thinp. See Kent's suggestion to use Ming 131. I'm not sure why things are not working for dm-thinp. Presumably Kent's code would split the discard at

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-10 Thread Mike Snitzer
On Mon, Aug 10 2015 at 10:00pm -0400, Martin K. Petersen martin.peter...@oracle.com wrote: Ming == Ming Lin m...@kernel.org writes: Ming Did you mean still use (UINT_MAX 9) in blkdev_issue_discard()? Ming But that doesn't work for dm-thinp. See Kent's suggestion to use Ming 131. I'm

Re: [dm-devel] [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-09 Thread Ming Lin
On Sun, 2015-08-09 at 00:01 -0700, Christoph Hellwig wrote: > On Sat, Aug 08, 2015 at 11:55:47PM -0700, Ming Lin wrote: > > Will change it to MAX_BIO_SECTORS. > > May I add your ACK? > > Yes, please go ahead. Thanks. I'll send a new version of the series once device-mapper guy acks. Hi Mike, I

Re: [dm-devel] [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-09 Thread Christoph Hellwig
On Sat, Aug 08, 2015 at 11:55:47PM -0700, Ming Lin wrote: > Will change it to MAX_BIO_SECTORS. > May I add your ACK? Yes, please go ahead. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [dm-devel] [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-09 Thread Ming Lin
On Sat, 2015-08-08 at 23:41 -0700, Christoph Hellwig wrote: > On Sat, Aug 08, 2015 at 10:59:50PM -0700, Ming Lin wrote: > > +/* > > + * Ensure that max discard sectors doesn't overflow bi_size and hopefully > > + * it is of the proper granularity as long as the granularity is a power > > + * of

Re: [dm-devel] [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-09 Thread Christoph Hellwig
On Sat, Aug 08, 2015 at 10:59:50PM -0700, Ming Lin wrote: > +/* > + * Ensure that max discard sectors doesn't overflow bi_size and hopefully > + * it is of the proper granularity as long as the granularity is a power > + * of two. > + */ > +#define MAX_DISCARD_SECTORS ((1U << 31) >> 9) Thisn't

Re: [dm-devel] [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-09 Thread Ming Lin
On Sat, 2015-08-08 at 12:19 -0400, Martin K. Petersen wrote: > > "Mike" == Mike Snitzer writes: > > Mike> This will translate to all intermediate layers that might split > Mike> discards needing to worry about granularity/alignment too > Mike> (e.g. how dm-thinp will have to care because it

Re: [dm-devel] [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-09 Thread Ming Lin
On Sat, 2015-08-08 at 12:19 -0400, Martin K. Petersen wrote: Mike == Mike Snitzer snit...@redhat.com writes: Mike This will translate to all intermediate layers that might split Mike discards needing to worry about granularity/alignment too Mike (e.g. how dm-thinp will have to care because

Re: [dm-devel] [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-09 Thread Christoph Hellwig
On Sat, Aug 08, 2015 at 10:59:50PM -0700, Ming Lin wrote: +/* + * Ensure that max discard sectors doesn't overflow bi_size and hopefully + * it is of the proper granularity as long as the granularity is a power + * of two. + */ +#define MAX_DISCARD_SECTORS ((1U 31) 9) Thisn't isn't

Re: [dm-devel] [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-09 Thread Ming Lin
On Sat, 2015-08-08 at 23:41 -0700, Christoph Hellwig wrote: On Sat, Aug 08, 2015 at 10:59:50PM -0700, Ming Lin wrote: +/* + * Ensure that max discard sectors doesn't overflow bi_size and hopefully + * it is of the proper granularity as long as the granularity is a power + * of two. + */

Re: [dm-devel] [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-09 Thread Christoph Hellwig
On Sat, Aug 08, 2015 at 11:55:47PM -0700, Ming Lin wrote: Will change it to MAX_BIO_SECTORS. May I add your ACK? Yes, please go ahead. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [dm-devel] [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-09 Thread Ming Lin
On Sun, 2015-08-09 at 00:01 -0700, Christoph Hellwig wrote: On Sat, Aug 08, 2015 at 11:55:47PM -0700, Ming Lin wrote: Will change it to MAX_BIO_SECTORS. May I add your ACK? Yes, please go ahead. Thanks. I'll send a new version of the series once device-mapper guy acks. Hi Mike, I have

Re: [dm-devel] [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-08 Thread Martin K. Petersen
> "Mike" == Mike Snitzer writes: Mike> This will translate to all intermediate layers that might split Mike> discards needing to worry about granularity/alignment too Mike> (e.g. how dm-thinp will have to care because it must generate Mike> discard mappings with associated bios based on how

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-08 Thread Christoph Hellwig
On Fri, Aug 07, 2015 at 09:22:26PM -0800, Kent Overstreet wrote: > Is granularity required to be a power of two? One would hope, but looking at > the > code that doesn't appear to be a requirement... ugh, that's terrible... If devices have an odd granularity we'll just have to split more than

Re: [dm-devel] [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-08 Thread Kent Overstreet
On Sat, Aug 08, 2015 at 10:52:24AM +0200, Hannes Reinecke wrote: > Wouldn't it be easier to move both max_write_same_sectors and > max_discard sectors to 64 bit (ie to type sector_t) and be done with the > overflow? > Seems to me this is far too much coding around self-imposed restrictions...

Re: [dm-devel] [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-08 Thread Hannes Reinecke
On 08/08/2015 01:40 AM, Ming Lin wrote: > > On Fri, 2015-08-07 at 09:30 +0200, Christoph Hellwig wrote: >> I'm for solution 3: >> >> - keep blk_bio_{discard,write_same}_split, but ensure we never built >>a > 4GB bio in blkdev_issue_{discard,write_same}. > > This has problem as I mentioned

Re: [dm-devel] [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-08 Thread Hannes Reinecke
On 08/08/2015 01:40 AM, Ming Lin wrote: On Fri, 2015-08-07 at 09:30 +0200, Christoph Hellwig wrote: I'm for solution 3: - keep blk_bio_{discard,write_same}_split, but ensure we never built a 4GB bio in blkdev_issue_{discard,write_same}. This has problem as I mentioned in solution 1.

Re: [dm-devel] [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-08 Thread Kent Overstreet
On Sat, Aug 08, 2015 at 10:52:24AM +0200, Hannes Reinecke wrote: Wouldn't it be easier to move both max_write_same_sectors and max_discard sectors to 64 bit (ie to type sector_t) and be done with the overflow? Seems to me this is far too much coding around self-imposed restrictions... It's

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-08 Thread Christoph Hellwig
On Fri, Aug 07, 2015 at 09:22:26PM -0800, Kent Overstreet wrote: Is granularity required to be a power of two? One would hope, but looking at the code that doesn't appear to be a requirement... ugh, that's terrible... If devices have an odd granularity we'll just have to split more than

Re: [dm-devel] [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-08 Thread Martin K. Petersen
Mike == Mike Snitzer snit...@redhat.com writes: Mike This will translate to all intermediate layers that might split Mike discards needing to worry about granularity/alignment too Mike (e.g. how dm-thinp will have to care because it must generate Mike discard mappings with associated bios based

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-07 Thread Kent Overstreet
On Fri, Aug 07, 2015 at 10:17:43PM -0700, Ming Lin wrote: > On Fri, Aug 7, 2015 at 5:30 PM, Kent Overstreet > > Ideally we'd get upper layers out of the business of knowing about the queue > > limits at all - that was the point of the patch series, after all. > > > > Instead of using UINT_MAX,

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-07 Thread Ming Lin
On Fri, Aug 7, 2015 at 5:30 PM, Kent Overstreet wrote: > On Fri, Aug 07, 2015 at 04:40:06PM -0700, Ming Lin wrote: >> >> On Fri, 2015-08-07 at 09:30 +0200, Christoph Hellwig wrote: >> > I'm for solution 3: >> > >> > - keep blk_bio_{discard,write_same}_split, but ensure we never built >> >a >

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-07 Thread Kent Overstreet
On Fri, Aug 07, 2015 at 04:40:06PM -0700, Ming Lin wrote: > > On Fri, 2015-08-07 at 09:30 +0200, Christoph Hellwig wrote: > > I'm for solution 3: > > > > - keep blk_bio_{discard,write_same}_split, but ensure we never built > >a > 4GB bio in blkdev_issue_{discard,write_same}. > > This has

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-07 Thread Ming Lin
On Fri, 2015-08-07 at 09:30 +0200, Christoph Hellwig wrote: > I'm for solution 3: > > - keep blk_bio_{discard,write_same}_split, but ensure we never built >a > 4GB bio in blkdev_issue_{discard,write_same}. This has problem as I mentioned in solution 1. We need to also make sure max discard

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-07 Thread Christoph Hellwig
On Thu, Aug 06, 2015 at 05:00:04PM -0700, Kent Overstreet wrote: > Why is it that we don't want to send giant discards? Is it a latency issue? Yes. Take a look at the "Configurable max discard size" thread(s). -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-07 Thread Christoph Hellwig
I'm for solution 3: - keep blk_bio_{discard,write_same}_split, but ensure we never built a > 4GB bio in blkdev_issue_{discard,write_same}. Note that this isn't special casing, we can't build > 4GB bios for data either, it's just implemented as a side effect right now instead of checked

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-07 Thread Ming Lin
On Fri, 2015-08-07 at 09:30 +0200, Christoph Hellwig wrote: I'm for solution 3: - keep blk_bio_{discard,write_same}_split, but ensure we never built a 4GB bio in blkdev_issue_{discard,write_same}. This has problem as I mentioned in solution 1. We need to also make sure max discard size

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-07 Thread Kent Overstreet
On Fri, Aug 07, 2015 at 04:40:06PM -0700, Ming Lin wrote: On Fri, 2015-08-07 at 09:30 +0200, Christoph Hellwig wrote: I'm for solution 3: - keep blk_bio_{discard,write_same}_split, but ensure we never built a 4GB bio in blkdev_issue_{discard,write_same}. This has problem as I

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-07 Thread Ming Lin
On Fri, Aug 7, 2015 at 5:30 PM, Kent Overstreet kent.overstr...@gmail.com wrote: On Fri, Aug 07, 2015 at 04:40:06PM -0700, Ming Lin wrote: On Fri, 2015-08-07 at 09:30 +0200, Christoph Hellwig wrote: I'm for solution 3: - keep blk_bio_{discard,write_same}_split, but ensure we never built

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-07 Thread Kent Overstreet
On Fri, Aug 07, 2015 at 10:17:43PM -0700, Ming Lin wrote: On Fri, Aug 7, 2015 at 5:30 PM, Kent Overstreet Ideally we'd get upper layers out of the business of knowing about the queue limits at all - that was the point of the patch series, after all. Instead of using UINT_MAX, would it

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-07 Thread Christoph Hellwig
On Thu, Aug 06, 2015 at 05:00:04PM -0700, Kent Overstreet wrote: Why is it that we don't want to send giant discards? Is it a latency issue? Yes. Take a look at the Configurable max discard size thread(s). -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-07 Thread Christoph Hellwig
I'm for solution 3: - keep blk_bio_{discard,write_same}_split, but ensure we never built a 4GB bio in blkdev_issue_{discard,write_same}. Note that this isn't special casing, we can't build 4GB bios for data either, it's just implemented as a side effect right now instead of checked

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-06 Thread Kent Overstreet
On Tue, Aug 04, 2015 at 01:36:26PM +0200, Christoph Hellwig wrote: > On Sun, Aug 02, 2015 at 10:58:22PM -0700, Ming Lin wrote: > > I think the important thing is the late splitting for regular bio. > > For discard/write_same bio, how about just don't do late splitting? > > I'd hate having to

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-06 Thread Kent Overstreet
On Tue, Aug 04, 2015 at 01:36:26PM +0200, Christoph Hellwig wrote: On Sun, Aug 02, 2015 at 10:58:22PM -0700, Ming Lin wrote: I think the important thing is the late splitting for regular bio. For discard/write_same bio, how about just don't do late splitting? I'd hate having to special

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-05 Thread Ming Lin
On Tue, 2015-08-04 at 13:36 +0200, Christoph Hellwig wrote: > On Sun, Aug 02, 2015 at 10:58:22PM -0700, Ming Lin wrote: > > I think the important thing is the late splitting for regular bio. > > For discard/write_same bio, how about just don't do late splitting? > > I'd hate having to special

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-05 Thread Ming Lin
On Tue, 2015-08-04 at 13:36 +0200, Christoph Hellwig wrote: On Sun, Aug 02, 2015 at 10:58:22PM -0700, Ming Lin wrote: I think the important thing is the late splitting for regular bio. For discard/write_same bio, how about just don't do late splitting? I'd hate having to special case them

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-04 Thread Christoph Hellwig
On Sun, Aug 02, 2015 at 10:58:22PM -0700, Ming Lin wrote: > I think the important thing is the late splitting for regular bio. > For discard/write_same bio, how about just don't do late splitting? I'd hate having to special case them even more. Especially as the discard splitting is nasty and we

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-04 Thread Christoph Hellwig
On Sun, Aug 02, 2015 at 10:58:22PM -0700, Ming Lin wrote: I think the important thing is the late splitting for regular bio. For discard/write_same bio, how about just don't do late splitting? I'd hate having to special case them even more. Especially as the discard splitting is nasty and we

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-02 Thread Ming Lin
On Sat, 2015-08-01 at 12:33 -0400, Mike Snitzer wrote: > On Sat, Aug 01 2015 at 2:58am -0400, > Ming Lin wrote: > > > On Fri, 2015-07-31 at 17:38 -0400, Mike Snitzer wrote: > > > > > > OK, once setup, to run the 2 tests in question directly you'd do > > > something like: > > > > > > dmtest

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-02 Thread Ming Lin
On Sat, 2015-08-01 at 12:33 -0400, Mike Snitzer wrote: On Sat, Aug 01 2015 at 2:58am -0400, Ming Lin m...@kernel.org wrote: On Fri, 2015-07-31 at 17:38 -0400, Mike Snitzer wrote: OK, once setup, to run the 2 tests in question directly you'd do something like: dmtest run

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-01 Thread Mike Snitzer
On Sat, Aug 01 2015 at 2:58am -0400, Ming Lin wrote: > On Fri, 2015-07-31 at 17:38 -0400, Mike Snitzer wrote: > > > > OK, once setup, to run the 2 tests in question directly you'd do > > something like: > > > > dmtest run --suite thin-provisioning -n discard_a_fragmented_device > > > >

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-01 Thread Ming Lin
On Fri, 2015-07-31 at 17:38 -0400, Mike Snitzer wrote: > On Fri, Jul 31 2015 at 5:19pm -0400, > Ming Lin wrote: > > > On Fri, Jul 31, 2015 at 12:23 PM, Mike Snitzer wrote: > > > On Mon, Jul 06 2015 at 3:44P -0400, > > > Ming Lin wrote: > > > > > >> From: Kent Overstreet > > >> > > >> The

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-01 Thread Ming Lin
On Fri, 2015-07-31 at 17:38 -0400, Mike Snitzer wrote: On Fri, Jul 31 2015 at 5:19pm -0400, Ming Lin m...@kernel.org wrote: On Fri, Jul 31, 2015 at 12:23 PM, Mike Snitzer snit...@redhat.com wrote: On Mon, Jul 06 2015 at 3:44P -0400, Ming Lin m...@kernel.org wrote: From: Kent

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-01 Thread Mike Snitzer
On Sat, Aug 01 2015 at 2:58am -0400, Ming Lin m...@kernel.org wrote: On Fri, 2015-07-31 at 17:38 -0400, Mike Snitzer wrote: OK, once setup, to run the 2 tests in question directly you'd do something like: dmtest run --suite thin-provisioning -n discard_a_fragmented_device

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-07-31 Thread Ming Lin
On Fri, Jul 31, 2015 at 3:02 PM, Ming Lin wrote: > On Fri, 2015-07-31 at 17:38 -0400, Mike Snitzer wrote: >> On Fri, Jul 31 2015 at 5:19pm -0400, >> Ming Lin wrote: >> >> > On Fri, Jul 31, 2015 at 12:23 PM, Mike Snitzer wrote: >> > > On Mon, Jul 06 2015 at 3:44P -0400, >> > > Ming Lin wrote:

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-07-31 Thread Ming Lin
On Fri, 2015-07-31 at 17:38 -0400, Mike Snitzer wrote: > On Fri, Jul 31 2015 at 5:19pm -0400, > Ming Lin wrote: > > > On Fri, Jul 31, 2015 at 12:23 PM, Mike Snitzer wrote: > > > On Mon, Jul 06 2015 at 3:44P -0400, > > > Ming Lin wrote: > > > > > >> From: Kent Overstreet > > >> > > >> The

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-07-31 Thread Mike Snitzer
On Fri, Jul 31 2015 at 5:19pm -0400, Ming Lin wrote: > On Fri, Jul 31, 2015 at 12:23 PM, Mike Snitzer wrote: > > On Mon, Jul 06 2015 at 3:44P -0400, > > Ming Lin wrote: > > > >> From: Kent Overstreet > >> > >> The way the block layer is currently written, it goes to great lengths > >> to

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-07-31 Thread Ming Lin
On Fri, Jul 31, 2015 at 12:23 PM, Mike Snitzer wrote: > On Mon, Jul 06 2015 at 3:44P -0400, > Ming Lin wrote: > >> From: Kent Overstreet >> >> The way the block layer is currently written, it goes to great lengths >> to avoid having to split bios; upper layer code (such as bio_add_page()) >>

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-07-31 Thread Mike Snitzer
On Mon, Jul 06 2015 at 3:44P -0400, Ming Lin wrote: > From: Kent Overstreet > > The way the block layer is currently written, it goes to great lengths > to avoid having to split bios; upper layer code (such as bio_add_page()) > checks what the underlying device can handle and tries to always

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-07-31 Thread Mike Snitzer
On Mon, Jul 06 2015 at 3:44P -0400, Ming Lin m...@kernel.org wrote: From: Kent Overstreet kent.overstr...@gmail.com The way the block layer is currently written, it goes to great lengths to avoid having to split bios; upper layer code (such as bio_add_page()) checks what the underlying

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-07-31 Thread Mike Snitzer
On Fri, Jul 31 2015 at 5:19pm -0400, Ming Lin m...@kernel.org wrote: On Fri, Jul 31, 2015 at 12:23 PM, Mike Snitzer snit...@redhat.com wrote: On Mon, Jul 06 2015 at 3:44P -0400, Ming Lin m...@kernel.org wrote: From: Kent Overstreet kent.overstr...@gmail.com The way the block layer

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-07-31 Thread Ming Lin
On Fri, Jul 31, 2015 at 12:23 PM, Mike Snitzer snit...@redhat.com wrote: On Mon, Jul 06 2015 at 3:44P -0400, Ming Lin m...@kernel.org wrote: From: Kent Overstreet kent.overstr...@gmail.com The way the block layer is currently written, it goes to great lengths to avoid having to split bios;

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-07-31 Thread Ming Lin
On Fri, 2015-07-31 at 17:38 -0400, Mike Snitzer wrote: On Fri, Jul 31 2015 at 5:19pm -0400, Ming Lin m...@kernel.org wrote: On Fri, Jul 31, 2015 at 12:23 PM, Mike Snitzer snit...@redhat.com wrote: On Mon, Jul 06 2015 at 3:44P -0400, Ming Lin m...@kernel.org wrote: From: Kent

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-07-31 Thread Ming Lin
On Fri, Jul 31, 2015 at 3:02 PM, Ming Lin m...@kernel.org wrote: On Fri, 2015-07-31 at 17:38 -0400, Mike Snitzer wrote: On Fri, Jul 31 2015 at 5:19pm -0400, Ming Lin m...@kernel.org wrote: On Fri, Jul 31, 2015 at 12:23 PM, Mike Snitzer snit...@redhat.com wrote: On Mon, Jul 06 2015 at

[PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-07-06 Thread Ming Lin
From: Kent Overstreet The way the block layer is currently written, it goes to great lengths to avoid having to split bios; upper layer code (such as bio_add_page()) checks what the underlying device can handle and tries to always create bios that don't need to be split. But this approach

[PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-07-06 Thread mlin
From: Kent Overstreet The way the block layer is currently written, it goes to great lengths to avoid having to split bios; upper layer code (such as bio_add_page()) checks what the underlying device can handle and tries to always create bios that don't need to be split. But this approach

[PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-07-06 Thread Ming Lin
From: Kent Overstreet kent.overstr...@gmail.com The way the block layer is currently written, it goes to great lengths to avoid having to split bios; upper layer code (such as bio_add_page()) checks what the underlying device can handle and tries to always create bios that don't need to be split.

[PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-07-06 Thread mlin
From: Kent Overstreet kent.overstr...@gmail.com The way the block layer is currently written, it goes to great lengths to avoid having to split bios; upper layer code (such as bio_add_page()) checks what the underlying device can handle and tries to always create bios that don't need to be split.