aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2011-05-29 08:03:09 -0400
committerAlasdair G Kergon <agk@redhat.com>2011-05-29 08:03:09 -0400
commitbda8efec5c706a672e0714d341a342e811f0262a (patch)
tree7daf7b505723f5ed2767353dc3fe53b939c46d87 /include/linux
parentd04714580f12379fcf7a0f799e86c92b96dd4e1f (diff)
dm io: use fixed initial mempool size
Replace the arbitrary calculation of an initial io struct mempool size with a constant. The code calculated the number of reserved structures based on the request size and used a "magic" multiplication constant of 4. This patch changes it to reserve a fixed number - itself still chosen quite arbitrarily. Further testing might show if there is a better number to choose. Note that if there is no memory pressure, we can still allocate an arbitrary number of "struct io" structures. One structure is enough to process the whole request. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/dm-io.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/dm-io.h b/include/linux/dm-io.h
index 5c9186b93fff..f4b0aa3126f5 100644
--- a/include/linux/dm-io.h
+++ b/include/linux/dm-io.h
@@ -69,8 +69,7 @@ struct dm_io_request {
69 * 69 *
70 * Create/destroy may block. 70 * Create/destroy may block.
71 */ 71 */
72struct dm_io_client *dm_io_client_create(unsigned num_pages); 72struct dm_io_client *dm_io_client_create(void);
73int dm_io_client_resize(unsigned num_pages, struct dm_io_client *client);
74void dm_io_client_destroy(struct dm_io_client *client); 73void dm_io_client_destroy(struct dm_io_client *client);
75 74
76/* 75/*