diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2008-12-11 13:53:43 +0300 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-12-29 10:28:46 +0300 |
commit | 7ff9345ffac56743b5001561bc2dc1e041b79149 (patch) | |
tree | aede8c4b4b52c7808cdea7ec039655accffd2298 /include/linux | |
parent | a31a97381cdf7dceb03b797a8faf9bc8a01c65d1 (diff) | |
download | linux-7ff9345ffac56743b5001561bc2dc1e041b79149.tar.xz |
bio: only mempool back the largest bio_vec slab cache
We only very rarely need the mempool backing, so it makes sense to
get rid of all but one of the mempool in a bio_set. So keep the
largest bio_vec count mempool so we can always honor the largest
allocation, and "upgrade" callers that fail.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/bio.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index 3ed714eb54d9..d76e4bf22f29 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -397,13 +397,14 @@ static inline void bio_set_completion_cpu(struct bio *bio, unsigned int cpu) */ #define BIO_POOL_SIZE 2 #define BIOVEC_NR_POOLS 6 +#define BIOVEC_MAX_IDX (BIOVEC_NR_POOLS - 1) struct bio_set { mempool_t *bio_pool; #if defined(CONFIG_BLK_DEV_INTEGRITY) mempool_t *bio_integrity_pool; #endif - mempool_t *bvec_pools[BIOVEC_NR_POOLS]; + mempool_t *bvec_pool; }; struct biovec_slab { |