Thread (5 messages) 5 messages, 3 authors, 2021-01-27

Re: [PATCH v4 1/1] loop: scale loop device by introducing per device lock

From: Pavel Tatashin <pasha.tatashin@soleen.com>
Date: 2021-01-27 16:15:42
Also in: lkml

On Tue, Jan 26, 2021 at 3:09 PM Jens Axboe [off-list ref] wrote:
On 1/26/21 7:46 AM, Pavel Tatashin wrote:
quoted
Currently, loop device has only one global lock: loop_ctl_mutex.

This becomes hot in scenarios where many loop devices are used.

Scale it by introducing per-device lock: lo_mutex that protects
modifications of all fields in struct loop_device.

Keep loop_ctl_mutex to protect global data: loop_index_idr, loop_lookup,
loop_add.

The new lock ordering requirement is that loop_ctl_mutex must be taken
before lo_mutex.
Applied, thanks.
Great, thank you!

Pasha
--
Jens Axboe
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help