Commit f8350daf authored by Joe Thornber's avatar Joe Thornber Committed by Alasdair G Kergon

dm cache: tune migration throttling

Tune the dm cache migration throttling.

i) Issue a tick every second, just in case there's no i/o going through.

ii) Drop the migration threshold right down to something suitable for
background work.
Signed-off-by: default avatarJoe Thornber <ejt@redhat.com>
Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
parent 042bcef8
...@@ -1445,6 +1445,7 @@ static void do_worker(struct work_struct *ws) ...@@ -1445,6 +1445,7 @@ static void do_worker(struct work_struct *ws)
static void do_waker(struct work_struct *ws) static void do_waker(struct work_struct *ws)
{ {
struct cache *cache = container_of(to_delayed_work(ws), struct cache, waker); struct cache *cache = container_of(to_delayed_work(ws), struct cache, waker);
policy_tick(cache->policy);
wake_worker(cache); wake_worker(cache);
queue_delayed_work(cache->wq, &cache->waker, COMMIT_PERIOD); queue_delayed_work(cache->wq, &cache->waker, COMMIT_PERIOD);
} }
...@@ -1886,7 +1887,7 @@ static sector_t calculate_discard_block_size(sector_t cache_block_size, ...@@ -1886,7 +1887,7 @@ static sector_t calculate_discard_block_size(sector_t cache_block_size,
return discard_block_size; return discard_block_size;
} }
#define DEFAULT_MIGRATION_THRESHOLD (2048 * 100) #define DEFAULT_MIGRATION_THRESHOLD 2048
static int cache_create(struct cache_args *ca, struct cache **result) static int cache_create(struct cache_args *ca, struct cache **result)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment