Mikulas Patocka 95f8fac8dc dm raid1: switch read_record from kmalloc to slab to save memory
With my previous patch to save bi_io_vec, the size of dm_raid1_read_record
is significantly increased (the vector list takes 3072 bytes on 32-bit machines
and 4096 bytes on 64-bit machines).

The structure dm_raid1_read_record used to be allocated with kmalloc,
but kmalloc aligns the size on the next power-of-two so an object
slightly greater than 4096 will allocate 8192 bytes of memory and half of
that memory will be wasted.

This patch turns kmalloc into a slab cache which doesn't have this
padding so it will reduce the memory consumed.

Cc: stable@kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2009-04-02 19:55:24 +01:00
..
2009-03-28 20:29:51 +00:00
2009-03-21 19:06:51 -07:00
2009-03-28 20:29:51 +00:00
2009-04-01 08:59:22 -07:00
2009-03-30 21:55:25 +10:30
2009-04-01 08:59:23 -07:00
2009-03-28 20:29:51 +00:00
2009-04-01 12:51:33 -07:00
2009-03-27 20:13:20 -04:00
2009-04-01 08:59:34 -07:00