From: Jens Axboe <axboe@kernel.dk>
To: Pavel Tatashin <pasha.tatashin@soleen.com>,
tyhicks@linux.microsoft.com, linux-block@vger.kernel.org,
linux-kernel@vger.kernel.org, sashal@kernel.org,
jmorris@namei.org, lukas.bulwahn@gmail.com, hch@lst.de,
pvorel@suse.cz, ming.lei@redhat.com, mzxreary@0pointer.de,
mcgrof@kernel.org, zhengbin13@huawei.com, maco@android.com,
colin.king@canonical.com, evgreen@chromium.org
Subject: Re: [PATCH v4 1/1] loop: scale loop device by introducing per device lock
Date: Tue, 26 Jan 2021 13:09:05 -0700 [thread overview]
Message-ID: <daf21294-f51e-3f03-8a46-d0181104d9e3@kernel.dk> (raw)
In-Reply-To: <20210126144630.230714-2-pasha.tatashin@soleen.com>
On 1/26/21 7:46 AM, Pavel Tatashin wrote:
> 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.
--
Jens Axboe
next prev parent reply other threads:[~2021-01-27 3:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-26 14:46 [PATCH v4 0/1] scale loop device lock Pavel Tatashin
2021-01-26 14:46 ` [PATCH v4 1/1] loop: scale loop device by introducing per " Pavel Tatashin
2021-01-26 20:09 ` Jens Axboe [this message]
2021-01-27 16:12 ` Pavel Tatashin
2021-01-26 19:03 ` [PATCH v4 0/1] scale loop " Chaitanya Kulkarni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=daf21294-f51e-3f03-8a46-d0181104d9e3@kernel.dk \
--to=axboe@kernel.dk \
--cc=colin.king@canonical.com \
--cc=evgreen@chromium.org \
--cc=hch@lst.de \
--cc=jmorris@namei.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas.bulwahn@gmail.com \
--cc=maco@android.com \
--cc=mcgrof@kernel.org \
--cc=ming.lei@redhat.com \
--cc=mzxreary@0pointer.de \
--cc=pasha.tatashin@soleen.com \
--cc=pvorel@suse.cz \
--cc=sashal@kernel.org \
--cc=tyhicks@linux.microsoft.com \
--cc=zhengbin13@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).