aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-snap.c
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2011-05-29 08:03:11 -0400
committerAlasdair G Kergon <agk@redhat.com>2011-05-29 08:03:11 -0400
commit5f43ba2950414dc0abf4ac44c397d88069056746 (patch)
treef80df9947ef30f965d9c33e649d1856f1e47220f /drivers/md/dm-snap.c
parentbda8efec5c706a672e0714d341a342e811f0262a (diff)
dm kcopyd: reserve fewer pages
Reserve just the minimum of pages needed to process one job. Because we allocate pages from page allocator, we don't need to reserve a large number of pages. The maximum job size is SUB_JOB_SIZE and we calculate the number of reserved pages based on this. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-snap.c')
-rw-r--r--drivers/md/dm-snap.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c
index a2d330942cb2..5a2296de84a3 100644
--- a/drivers/md/dm-snap.c
+++ b/drivers/md/dm-snap.c
@@ -40,11 +40,6 @@ static const char dm_snapshot_merge_target_name[] = "snapshot-merge";
40#define SNAPSHOT_COPY_PRIORITY 2 40#define SNAPSHOT_COPY_PRIORITY 2
41 41
42/* 42/*
43 * Reserve 1MB for each snapshot initially (with minimum of 1 page).
44 */
45#define SNAPSHOT_PAGES (((1UL << 20) >> PAGE_SHIFT) ? : 1)
46
47/*
48 * The size of the mempool used to track chunks in use. 43 * The size of the mempool used to track chunks in use.
49 */ 44 */
50#define MIN_IOS 256 45#define MIN_IOS 256
@@ -1116,7 +1111,7 @@ static int snapshot_ctr(struct dm_target *ti, unsigned int argc, char **argv)
1116 goto bad_hash_tables; 1111 goto bad_hash_tables;
1117 } 1112 }
1118 1113
1119 r = dm_kcopyd_client_create(SNAPSHOT_PAGES, &s->kcopyd_client); 1114 r = dm_kcopyd_client_create(&s->kcopyd_client);
1120 if (r) { 1115 if (r) {
1121 ti->error = "Could not create kcopyd client"; 1116 ti->error = "Could not create kcopyd client";
1122 goto bad_kcopyd; 1117 goto bad_kcopyd;