From: Pavel Tatashin <pasha.tatashin@soleen.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: Tyler Hicks <tyhicks@linux.microsoft.com>,
linux-block@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
Sasha Levin <sashal@kernel.org>, James Morris <jmorris@namei.org>,
lukas.bulwahn@gmail.com, hch@lst.de, Petr Vorel <pvorel@suse.cz>,
ming.lei@redhat.com, mzxreary@0pointer.de, mcgrof@kernel.org,
zhengbin13@huawei.com, maco@android.com,
Colin King <colin.king@canonical.com>,
evgreen@chromium.org
Subject: Re: [PATCH v4 1/1] loop: scale loop device by introducing per device lock
Date: Wed, 27 Jan 2021 11:12:34 -0500 [thread overview]
Message-ID: <CA+CK2bBvKpWFtPz+OmjX5SJuAfL4hAaLbHmfRok4Ueo2toeTiA@mail.gmail.com> (raw)
In-Reply-To: <daf21294-f51e-3f03-8a46-d0181104d9e3@kernel.dk>
On Tue, Jan 26, 2021 at 3:09 PM Jens Axboe <axboe@kernel.dk> wrote:
>
> 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.
Great, thank you!
Pasha
>
> --
> Jens Axboe
>
next prev parent reply other threads:[~2021-01-27 16:15 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
2021-01-27 16:12 ` Pavel Tatashin [this message]
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=CA+CK2bBvKpWFtPz+OmjX5SJuAfL4hAaLbHmfRok4Ueo2toeTiA@mail.gmail.com \
--to=pasha.tatashin@soleen.com \
--cc=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=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).