diff options
author | Joe Thornber <ejt@redhat.com> | 2013-11-15 11:51:20 +0100 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2013-12-10 22:35:14 +0100 |
commit | af95e7a69b54bca48092e3013a92cfa3043c9c73 (patch) | |
tree | 70f0cf1eff5b7fef29b4656c83b0f57d71f838df /Documentation | |
parent | dm thin: allow pool in read-only mode to transition to read-write mode (diff) | |
download | linux-af95e7a69b54bca48092e3013a92cfa3043c9c73.tar.xz linux-af95e7a69b54bca48092e3013a92cfa3043c9c73.zip |
dm cache policy mq: fix promotions to occur as expected
Micro benchmarks that repeatedly issued IO to a single block were
failing to cause a promotion from the origin device to the cache. Fix
this by not updating the stats during map() if -EWOULDBLOCK will be
returned.
The mq policy will only update stats, consider migration, etc, once per
tick period (a unit of time established between dm-cache core and the
policies).
When the IO thread calls the policy's map method, if it would like to
migrate the associated block it returns -EWOULDBLOCK, the IO then gets
handed over to a worker thread which handles the migration. The worker
thread calls map again, to check the migration is still needed (avoids a
race among other things). *BUT*, before this fix, if we were still in
the same tick period the stats were already updated by the previous map
call -- so the migration would no longer be requested.
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions