summaryrefslogtreecommitdiffstats
path: root/include/linux/bio.h
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2008-12-11 11:53:43 +0100
committerJens Axboe <jens.axboe@oracle.com>2008-12-29 08:28:46 +0100
commit7ff9345ffac56743b5001561bc2dc1e041b79149 (patch)
treeaede8c4b4b52c7808cdea7ec039655accffd2298 /include/linux/bio.h
parenta31a97381cdf7dceb03b797a8faf9bc8a01c65d1 (diff)
downloadblackbird-op-linux-7ff9345ffac56743b5001561bc2dc1e041b79149.tar.gz
blackbird-op-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.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)
*/
#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 {
OpenPOWER on IntegriCloud