All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: dm-devel@redhat.com
Cc: ejt@redhat.com, agk@redhat.com
Subject: Re: thinp-test-suite: support for non power of 2 pool blocksize
Date: Sat, 28 Apr 2012 11:32:46 -0400	[thread overview]
Message-ID: <20120428153246.GA4416@redhat.com> (raw)
In-Reply-To: <20120428045151.GA853@redhat.com>

On Sat, Apr 28 2012 at 12:51am -0400,
Mike Snitzer <snitzer@redhat.com> wrote:

> On Sat, Apr 28 2012 at 12:44am -0400,
> Mike Snitzer <snitzer@redhat.com> wrote:
> 
> > Non power of 2 blocksize support is needed to properly align thinp IO
> > on storage that has non power of 2 optimal IO sizes (e.g. RAID6 10+2).
> > 
> > Use do_div wrappers to support non power of 2 blocksize for the pool's
> > data device.  do_div provides comparable performance to the power of 2
> > math that was performed until now (as tested on modern x86_64 hardware).
> > 
> > Verify that the pool's blocksize is a multiple of 64K and that the
> > pool's data device is a multiple of blocksize.
> 
> The non power of 2 support patch required quite a few thinp-test-suite
> fixes; this works for me but there may be more clever/clean ways to
> address rounding down the pool size to a multiple of blocksize...

Need this too:

diff --git a/pool_resize_tests.rb b/pool_resize_tests.rb
index 6c8eadf..61e046f 100644
--- a/pool_resize_tests.rb
+++ b/pool_resize_tests.rb
@@ -50,6 +50,8 @@ class PoolResizeTests < ThinpTestCase
 
   def test_resize_no_io
     target_step = @size / 8
+    target_step /= @data_block_size
+    target_step *= @data_block_size
     with_standard_pool(target_step) do |pool|
       2.upto(8) do |n|
         table = Table.new(ThinPool.new(n * target_step, @metadata_dev, @data_dev,

  reply	other threads:[~2012-04-28 15:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-28  4:44 [PATCH 1/2] dm: update max_io_len to support a split_io that is not a power of 2 Mike Snitzer
2012-04-28  4:44 ` [PATCH 2/2] dm thin: support for non power of 2 pool blocksize Mike Snitzer
2012-04-28  4:51   ` [PATCH] thinp-test-suite: " Mike Snitzer
2012-04-28 15:32     ` Mike Snitzer [this message]
2012-04-30 10:15     ` Joe Thornber
2012-04-30  9:55   ` [PATCH 2/2] dm thin: " Joe Thornber
2012-04-30 17:33     ` Mike Snitzer
2012-05-01  9:41       ` Joe Thornber
2012-04-30 16:10 ` [PATCH 1/2] dm: update max_io_len to support a split_io that is not a power of 2 Alasdair G Kergon
2012-04-30 17:24   ` Mike Snitzer
2012-04-30 18:36     ` Alasdair G Kergon
2012-04-30 18:59       ` Mike Snitzer
2012-05-01 15:42         ` Brassow Jonathan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120428153246.GA4416@redhat.com \
    --to=snitzer@redhat.com \
    --cc=agk@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=ejt@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.