Skip to content

Commit f8350da

Browse files
jthornberkergon
authored andcommitted
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: Joe Thornber <[email protected]> Signed-off-by: Alasdair G Kergon <[email protected]>
1 parent 042bcef commit f8350da

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/md/dm-cache-target.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1445,6 +1445,7 @@ static void do_worker(struct work_struct *ws)
14451445
static void do_waker(struct work_struct *ws)
14461446
{
14471447
struct cache *cache = container_of(to_delayed_work(ws), struct cache, waker);
1448+
policy_tick(cache->policy);
14481449
wake_worker(cache);
14491450
queue_delayed_work(cache->wq, &cache->waker, COMMIT_PERIOD);
14501451
}
@@ -1886,7 +1887,7 @@ static sector_t calculate_discard_block_size(sector_t cache_block_size,
18861887
return discard_block_size;
18871888
}
18881889

1889-
#define DEFAULT_MIGRATION_THRESHOLD (2048 * 100)
1890+
#define DEFAULT_MIGRATION_THRESHOLD 2048
18901891

18911892
static int cache_create(struct cache_args *ca, struct cache **result)
18921893
{

0 commit comments

Comments
 (0)