]> git.baikalelectronics.ru Git - kernel.git/commit
dm io: use fixed initial mempool size
authorMikulas Patocka <mpatocka@redhat.com>
Sun, 29 May 2011 12:03:09 +0000 (13:03 +0100)
committerAlasdair G Kergon <agk@redhat.com>
Sun, 29 May 2011 12:03:09 +0000 (13:03 +0100)
commit41b33f5845b7fa59423399b0f0b63bf46bb2e086
tree7daf7b505723f5ed2767353dc3fe53b939c46d87
parent07a55c88e6c49c062f5e658b17a0963b1cff6728
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>
drivers/md/dm-io.c
drivers/md/dm-kcopyd.c
drivers/md/dm-log.c
drivers/md/dm-raid1.c
drivers/md/dm-snap-persistent.c
include/linux/dm-io.h