summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-10-14 23:39:59 +0300
committerJens Axboe <axboe@kernel.dk>2021-12-04 00:51:29 +0300
commit0a467d0fdd9594fbb449ebc93852533332c528fd (patch)
treefd368b2ce4f835da5d78e1bbd381b38aa98fd078 /include
parentceaa762527f41a431b552bc000de4b626d2d8cb7 (diff)
downloadlinux-0a467d0fdd9594fbb449ebc93852533332c528fd.tar.xz
block: switch to atomic_t for request references
refcount_t is not as expensive as it used to be, but it's still more expensive than the io_uring method of using atomic_t and just checking for potential over/underflow. This borrows that same implementation, which in turn is based on the mm implementation from Linus. Reviewed-by: Keith Busch <kbusch@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include')
-rw-r--r--include/linux/blk-mq.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h
index 1b87b7c8bbff..561beb5be7ec 100644
--- a/include/linux/blk-mq.h
+++ b/include/linux/blk-mq.h
@@ -139,7 +139,7 @@ struct request {
unsigned short ioprio;
enum mq_rq_state state;
- refcount_t ref;
+ atomic_t ref;
unsigned long deadline;