From: Bart Van Assche <Bart.VanAssche@wdc.com>
To: "jianchao.w.wang@oracle.com" <jianchao.w.wang@oracle.com>,
"axboe@kernel.dk" <axboe@kernel.dk>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: Re: [PATCH] blk-mq: use mutex_trylock to avoid lock inversion
Date: Tue, 19 Jun 2018 15:20:39 +0000 [thread overview]
Message-ID: <2409013d789ca266879d24c815b76c2193e23fe3.camel@wdc.com> (raw)
In-Reply-To: <1529391637-1704-1-git-send-email-jianchao.w.wang@oracle.com>
On Tue, 2018-06-19 at 15:00 +0800, Jianchao Wang wrote:
> Currently, the kobject_del for kobjs of mq, hctx and ctx is invoked
> under sysfs_lock, lock inversion will come up when other one is
> acessing the associated sysfs file and trying to acquire the
> sysfs_lock. To fix it, use mutex_trylock in blk_mq_sysfs_ops and
> blk_mq_hw_sysfs_ops, if the lock in on contending, return -EAGAIN.
Is this a theoretical issue or something you actually ran into? Which lock
other than sysfs_lock do you think is involved in the lock inversion?
Bart.
next prev parent reply other threads:[~2018-06-19 15:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-19 7:00 Jianchao Wang
2018-06-19 15:20 ` Bart Van Assche [this message]
2018-06-20 2:09 ` jianchao.wang
2018-06-20 16:18 ` Bart Van Assche
2018-06-21 8:23 ` jianchao.wang
2018-06-26 3:46 ` jianchao.wang
2018-06-26 15:36 ` Bart Van Assche
2018-06-28 1:11 ` jianchao.wang
2018-06-28 1:15 ` jianchao.wang
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=2409013d789ca266879d24c815b76c2193e23fe3.camel@wdc.com \
--to=bart.vanassche@wdc.com \
--cc=axboe@kernel.dk \
--cc=jianchao.w.wang@oracle.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®