From: Omar Sandoval <osandov@osandov.com>
To: Jens Axboe <axboe@fb.com>
Cc: linux-block@vger.kernel.org, paolo.valente@linaro.org
Subject: Re: [PATCH 2/2] block: free merged request in the caller
Date: Fri, 3 Feb 2017 08:44:04 -0800 [thread overview]
Message-ID: <20170203164404.GB26515@vader> (raw)
In-Reply-To: <1486051573-13445-3-git-send-email-axboe@fb.com>
On Thu, Feb 02, 2017 at 09:06:13AM -0700, Jens Axboe wrote:
> If we end up doing a request-to-request merge when we have completed
> a bio-to-request merge, we free the request from deep down in that
> path. For blk-mq-sched, the merge path has to hold the appropriate
> lock, but we don't need it for freeing the request. And in fact
> holding the lock is problematic, since we are now calling the
> mq sched put_rq_private() hook with the lock held. Other call paths
> do not hold this lock.
>
> Fix this inconsistency by ensuring that the caller frees a merged
> request. Then we can do it outside of the lock, making it both more
> efficient and fixing the blk-mq-sched problem of invoking parts of
> the scheduler with an unknown lock state.
>
> Reported-by: Paolo Valente <paolo.valente@linaro.org>
Reviewed-by: Omar Sandoval <osandov@fb.com>
> Signed-off-by: Jens Axboe <axboe@fb.com>
> ---
> block/blk-core.c | 12 +++++++++---
> block/blk-merge.c | 15 ++++++++++++---
> block/blk-mq-sched.c | 9 ++++++---
> block/blk-mq-sched.h | 3 ++-
> block/mq-deadline.c | 8 ++++++--
> 5 files changed, 35 insertions(+), 12 deletions(-)
next prev parent reply other threads:[~2017-02-03 16:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-02 16:06 [PATCH 0/2] blk-mq-sched: fix put_rq_private() lock inconsistency Jens Axboe
2017-02-02 16:06 ` [PATCH 1/2] blk-merge: return the merged request Jens Axboe
2017-02-03 16:42 ` Omar Sandoval
2017-02-02 16:06 ` [PATCH 2/2] block: free merged request in the caller Jens Axboe
2017-02-03 16:44 ` Omar Sandoval [this message]
2017-02-07 17:35 ` Paolo Valente
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=20170203164404.GB26515@vader \
--to=osandov@osandov.com \
--cc=axboe@fb.com \
--cc=linux-block@vger.kernel.org \
--cc=paolo.valente@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.