diff options
author | Milan Broz <mbroz@redhat.com> | 2008-04-24 16:42:36 -0400 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2008-04-25 08:26:35 -0400 |
commit | 8ee2767a5903fde549fd3597690f64c8d951051a (patch) | |
tree | d419a324e1da7323113e8b6e0063ba94ab70fa70 /drivers/md | |
parent | 924362629bf5645aee5f49f8a0d0d5b193e65997 (diff) |
dm snapshot: reduce default memory allocation
Limit the amount of memory allocated per snapshot on systems
with a large page size. (The larger default chunk size on
these systems compensates for the smaller number of pages reserved.)
Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm-snap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c index 4dc8a43c034b..08047fb1cac9 100644 --- a/drivers/md/dm-snap.c +++ b/drivers/md/dm-snap.c | |||
@@ -36,9 +36,9 @@ | |||
36 | #define SNAPSHOT_COPY_PRIORITY 2 | 36 | #define SNAPSHOT_COPY_PRIORITY 2 |
37 | 37 | ||
38 | /* | 38 | /* |
39 | * Each snapshot reserves this many pages for io | 39 | * Reserve 1MB for each snapshot initially (with minimum of 1 page). |
40 | */ | 40 | */ |
41 | #define SNAPSHOT_PAGES 256 | 41 | #define SNAPSHOT_PAGES (((1UL << 20) >> PAGE_SHIFT) ? : 1) |
42 | 42 | ||
43 | static struct workqueue_struct *ksnapd; | 43 | static struct workqueue_struct *ksnapd; |
44 | static void flush_queued_bios(struct work_struct *work); | 44 | static void flush_queued_bios(struct work_struct *work); |