diff options
| author | Yu Kuai <yukuai3@huawei.com> | 2025-09-10 16:04:39 +0800 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2025-09-10 05:25:56 -0600 |
| commit | 626ff4f8ebcb7207f01e7810acb85812ccf06bd8 (patch) | |
| tree | 58014888bd639595026aa685437f67179a01a38c /lib/crypto/mpi/mpiutil.c | |
| parent | b46d4c447db76e36906ed59ebb9b3ef8f3383322 (diff) | |
blk-mq: convert to serialize updating nr_requests with update_nr_hwq_lock
request_queue->nr_requests can be changed by:
a) switch elevator by updating nr_hw_queues
b) switch elevator by elevator sysfs attribute
c) configue queue sysfs attribute nr_requests
Current lock order is:
1) update_nr_hwq_lock, case a,b
2) freeze_queue
3) elevator_lock, case a,b,c
And update nr_requests is seriablized by elevator_lock() already,
however, in the case c, we'll have to allocate new sched_tags if
nr_requests grow, and do this with elevator_lock held and queue
freezed has the risk of deadlock.
Hence use update_nr_hwq_lock instead, make it possible to allocate
memory if tags grow, meanwhile also prevent nr_requests to be changed
concurrently.
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Nilay Shroff <nilay@linux.ibm.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'lib/crypto/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions
