Skip to content

Commit

Permalink
dm snapshot: reduce default memory allocation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Milan Broz authored and Alasdair G Kergon committed Apr 25, 2008
1 parent 9243626 commit 8ee2767
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/md/dm-snap.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
#define SNAPSHOT_COPY_PRIORITY 2

/*
* Each snapshot reserves this many pages for io
* Reserve 1MB for each snapshot initially (with minimum of 1 page).
*/
#define SNAPSHOT_PAGES 256
#define SNAPSHOT_PAGES (((1UL << 20) >> PAGE_SHIFT) ? : 1)

static struct workqueue_struct *ksnapd;
static void flush_queued_bios(struct work_struct *work);
Expand Down

0 comments on commit 8ee2767

Please sign in to comment.