diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2008-12-11 11:53:43 +0100 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-12-29 08:28:46 +0100 |
commit | 7ff9345ffac56743b5001561bc2dc1e041b79149 (patch) | |
tree | aede8c4b4b52c7808cdea7ec039655accffd2298 /include/linux/bio.h | |
parent | a31a97381cdf7dceb03b797a8faf9bc8a01c65d1 (diff) | |
download | talos-obmc-linux-7ff9345ffac56743b5001561bc2dc1e041b79149.tar.gz talos-obmc-linux-7ff9345ffac56743b5001561bc2dc1e041b79149.zip |
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/bio.h')
-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 { |