diff options
author | Jens Axboe <axboe@kernel.dk> | 2021-03-08 11:37:47 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-08-23 13:44:43 -0600 |
commit | be4d234d7aebbfe0c233bc20b9cdef7ab3408ff4 (patch) | |
tree | cc30999a6c468df13fdd8cdf1997789882e4ff9f /include/linux/blk_types.h | |
parent | 6c7ef543df909dbdcd8cb24ef30627cba62a4e91 (diff) |
bio: add allocation cache abstraction
Add a per-cpu bio_set cache for bio allocations, enabling us to quickly
recycle them instead of going through the slab allocator. This cache
isn't IRQ safe, and hence is only really suitable for polled IO.
Very simple - keeps a count of bio's in the cache, and maintains a max
of 512 with a slack of 64. If we get above max + slack, we drop slack
number of bio's.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/blk_types.h')
-rw-r--r-- | include/linux/blk_types.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index 290f9061b29a..f68d4e8c775e 100644 --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h @@ -301,6 +301,7 @@ enum { BIO_TRACKED, /* set if bio goes through the rq_qos path */ BIO_REMAPPED, BIO_ZONE_WRITE_LOCKED, /* Owns a zoned device zone write lock */ + BIO_PERCPU_CACHE, /* can participate in per-cpu alloc cache */ BIO_FLAG_LAST }; |