aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/bio.h
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2008-12-11 05:53:43 -0500
committerJens Axboe <jens.axboe@oracle.com>2008-12-29 02:28:46 -0500
commit7ff9345ffac56743b5001561bc2dc1e041b79149 (patch)
treeaede8c4b4b52c7808cdea7ec039655accffd2298 /include/linux/bio.h
parenta31a97381cdf7dceb03b797a8faf9bc8a01c65d1 (diff)
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.h3
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)
397 */ 397 */
398#define BIO_POOL_SIZE 2 398#define BIO_POOL_SIZE 2
399#define BIOVEC_NR_POOLS 6 399#define BIOVEC_NR_POOLS 6
400#define BIOVEC_MAX_IDX (BIOVEC_NR_POOLS - 1)
400 401
401struct bio_set { 402struct bio_set {
402 mempool_t *bio_pool; 403 mempool_t *bio_pool;
403#if defined(CONFIG_BLK_DEV_INTEGRITY) 404#if defined(CONFIG_BLK_DEV_INTEGRITY)
404 mempool_t *bio_integrity_pool; 405 mempool_t *bio_integrity_pool;
405#endif 406#endif
406 mempool_t *bvec_pools[BIOVEC_NR_POOLS]; 407 mempool_t *bvec_pool;
407}; 408};
408 409
409struct biovec_slab { 410struct biovec_slab {