mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
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>
This commit is contained in:
@@ -139,7 +139,7 @@ struct request {
|
||||
unsigned short ioprio;
|
||||
|
||||
enum mq_rq_state state;
|
||||
refcount_t ref;
|
||||
atomic_t ref;
|
||||
|
||||
unsigned long deadline;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user