]> Git Repo - linux.git/commit
dm: store dm_target_io in bio front_pad
authorMikulas Patocka <[email protected]>
Fri, 12 Oct 2012 20:02:15 +0000 (21:02 +0100)
committerAlasdair G Kergon <[email protected]>
Fri, 12 Oct 2012 20:02:15 +0000 (21:02 +0100)
commitdba141601d1327146c84b575bd581ea8730e901c
treefb2f82b07d682e5e8cbe5bca94249ad7dc6bbbd7
parent4f81a4176297db57c7ef3b2893092dd837c1e2a8
dm: store dm_target_io in bio front_pad

Use the recently-added bio front_pad field to allocate struct dm_target_io.

Prior to this patch, dm_target_io was allocated from a mempool. For each
dm_target_io, there is exactly one bio allocated from a bioset.

This patch merges these two allocations into one allocation: we create a
bioset with front_pad equal to the size of dm_target_io so that every
bio allocated from the bioset has sizeof(struct dm_target_io) bytes
before it. We allocate a bio and use the bytes before the bio as
dm_target_io.

_tio_cache is removed and the tio_pool mempool is now only used for
request-based devices.

This idea was introduced by Kent Overstreet.

Signed-off-by: Mikulas Patocka <[email protected]>
Cc: Kent Overstreet <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: [email protected]
Cc: Vivek Goyal <[email protected]>
Cc: Bill Pemberton <[email protected]>
Signed-off-by: Alasdair G Kergon <[email protected]>
drivers/md/dm.c
This page took 0.067043 seconds and 4 git commands to generate.