tc->block_shift is the shift to get from a sector to the block_size,
and it doesn't make any sense to apply that to the block size.
Without this I get overflows of the optimal I/O size queue limit
when using large block sizes in dm-thinp.
static int thinp_iterate_devices(struct dm_target *ti,
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
04-27-2011, 05:25 PM
Joe Thornber
dm-thinp: report correct optimal I/O size
On Wed, 2011-04-27 at 09:41 -0400, Christoph Hellwig wrote:
> tc->block_shift is the shift to get from a sector to the block_size,
> and it doesn't make any sense to apply that to the block size.
> Without this I get overflows of the optimal I/O size queue limit
> when using large block sizes in dm-thinp.
NACK.
>From looking at dm-raid and dm-stripe it appears that the
blk_limits_io_opt function is expecting the size to be in bytes, not
sectors.
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
04-28-2011, 08:42 AM
Christoph Hellwig
dm-thinp: report correct optimal I/O size
On Wed, Apr 27, 2011 at 06:25:25PM +0100, Joe Thornber wrote:
> tc->block_size is in sectors (you are passing sectors on the target
> line?).
>
> What's probably happening here is we should be doing:
>
> blk_limits_io_opt(limits, min(<some theoretical max>, tc->block_size << SECTOR_SHIFT));
Yes, that should do it. I don't even think we need the max, the optimum
I/O size is a 32-bit value and we'll reach the limit of the possible
block sizes much earlier.
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
04-28-2011, 08:47 AM
Joe Thornber
dm-thinp: report correct optimal I/O size
On Thu, 2011-04-28 at 04:42 -0400, Christoph Hellwig wrote:
> On Wed, Apr 27, 2011 at 06:25:25PM +0100, Joe Thornber wrote:
> > tc->block_size is in sectors (you are passing sectors on the target
> > line?).
> >
> > What's probably happening here is we should be doing:
> >
> > blk_limits_io_opt(limits, min(<some theoretical max>, tc->block_size << SECTOR_SHIFT));
>
> Yes, that should do it. I don't even think we need the max, the optimum
> I/O size is a 32-bit value and we'll reach the limit of the possible
> block sizes much earlier.
I'm tempted to just say min(16M, tc->block_size << SECTOR_SHIFT). Does
this sound reasonable to you?
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
04-28-2011, 08:49 AM
Christoph Hellwig
dm-thinp: report correct optimal I/O size
On Thu, Apr 28, 2011 at 09:47:33AM +0100, Joe Thornber wrote:
> I'm tempted to just say min(16M, tc->block_size << SECTOR_SHIFT). Does
> this sound reasonable to you?
If you have a good reason for the limit go for it. But please add a
comment explaining why the limit is there, so people running into it
later on won't be completely puzzled.
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel