From: Omar Sandoval <osandov@osandov.com>
To: Jens Axboe <axboe@fb.com>
Cc: Paolo Valente <paolo.valente@linaro.org>,
linux-block@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH] blk-mq-sched: don't hold queue_lock when calling exit_icq
Date: Thu, 2 Mar 2017 12:53:22 -0800 [thread overview]
Message-ID: <20170302205322.GB7792@vader> (raw)
In-Reply-To: <75978d1d-8022-75c2-7799-aa65132fdcdd@fb.com>
On Thu, Mar 02, 2017 at 09:13:30AM -0700, Jens Axboe wrote:
> I was worried about that. How about the below? We need to grab the lock
> at some point for legacy scheduling, but the ordering should be correct.
Makes sense, now the locking is consistent with the other place we call
ioc_exit_icq(). One nit below, and you can add
Reviewed-by: Omar Sandoval <osandov@fb.com>
> diff --git a/block/blk-ioc.c b/block/blk-ioc.c
> index b12f9c87b4c3..6fd633b5d567 100644
> --- a/block/blk-ioc.c
> +++ b/block/blk-ioc.c
> @@ -54,7 +54,7 @@ static void ioc_exit_icq(struct io_cq *icq)
> icq->flags |= ICQ_EXITED;
> }
>
> -/* Release an icq. Called with both ioc and q locked. */
> +/* Release an icq. Called with ioc locked. */
For ioc_exit_icq(), we have the more explicit comment
/*
* Exit an icq. Called with both ioc and q locked for sq, only ioc locked for
* mq.
*/
Could you document that here, too?
> static void ioc_destroy_icq(struct io_cq *icq)
> {
> struct io_context *ioc = icq->ioc;
> @@ -62,7 +62,6 @@ static void ioc_destroy_icq(struct io_cq *icq)
> struct elevator_type *et = q->elevator->type;
>
> lockdep_assert_held(&ioc->lock);
> - lockdep_assert_held(q->queue_lock);
>
> radix_tree_delete(&ioc->icq_tree, icq->q->id);
> hlist_del_init(&icq->ioc_node);
> @@ -222,24 +221,40 @@ void exit_io_context(struct task_struct *task)
> put_io_context_active(ioc);
> }
next prev parent reply other threads:[~2017-03-02 20:54 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-10 18:32 [PATCH] blk-mq-sched: don't hold queue_lock when calling exit_icq Omar Sandoval
2017-02-10 18:35 ` Jens Axboe
2017-02-15 17:24 ` Paolo Valente
2017-02-15 17:58 ` Jens Axboe
2017-02-15 18:04 ` Jens Axboe
2017-02-16 10:31 ` Paolo Valente
2017-02-17 10:30 ` Paolo Valente
2017-02-22 21:21 ` Paolo Valente
2017-03-02 10:28 ` Paolo Valente
2017-03-02 15:00 ` Jens Axboe
2017-03-02 15:13 ` Jens Axboe
2017-03-02 16:07 ` Paolo Valente
2017-03-02 16:13 ` Jens Axboe
2017-03-02 18:07 ` Paolo Valente
2017-03-02 18:25 ` Jens Axboe
2017-03-02 20:31 ` Paolo Valente
2017-03-02 20:53 ` Omar Sandoval [this message]
2017-03-02 20:59 ` Jens Axboe
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=20170302205322.GB7792@vader \
--to=osandov@osandov.com \
--cc=axboe@fb.com \
--cc=kernel-team@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox