diff options
| author | Jianchao Wang <[email protected]> | 2018-02-12 20:54:46 +0800 |
|---|---|---|
| committer | Jens Axboe <[email protected]> | 2018-03-26 08:53:43 -0600 |
| commit | 765cc031cddde40bdc279e8e2697571c7956c54e (patch) | |
| tree | 7d8beb4bcf2cf6fbe8cebdb600b3633158ce61e6 /tools/perf/scripts/python | |
| parent | 6f8e0d787e3727ed70116e3523f4ecb86887c000 (diff) | |
nvme: change namespaces_mutext to namespaces_rwsem
namespaces_mutext is used to synchronize the operations on ctrl
namespaces list. Most of the time, it is a read operation.
On the other hand, there are many interfaces in nvme core that
need this lock, such as nvme_wait_freeze, and even more interfaces
will be added. If we use mutex here, circular dependency could be
introduced easily. For example:
context A context B
nvme_xxx nvme_xxx
hold namespaces_mutext require namespaces_mutext
sync context B
So it is better to change it from mutex to rwsem.
Reviewed-by: Keith Busch <[email protected]>
Signed-off-by: Jianchao Wang <[email protected]>
Signed-off-by: Sagi Grimberg <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions