From: Jan Kara <jack@suse.cz>
To: Christoph Hellwig <hch@lst.de>
Cc: Jan Kara <jack@suse.cz>, Jens Axboe <axboe@kernel.dk>,
Paolo Valente <paolo.valente@linaro.org>,
Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>,
Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>,
linux-block@vger.kernel.org, linux-rdma@vger.kernel.org
Subject: Re: [PATCH 04/14] bfq: use bfq_bic_lookup in bfq_limit_depth
Date: Tue, 30 Nov 2021 11:26:06 +0100 [thread overview]
Message-ID: <20211130102606.GA7174@quack2.suse.cz> (raw)
In-Reply-To: <20211130063955.GA10268@lst.de>
On Tue 30-11-21 07:39:55, Christoph Hellwig wrote:
> On Mon, Nov 29, 2021 at 05:09:25PM +0100, Jan Kara wrote:
> > On Fri 26-11-21 12:58:07, Christoph Hellwig wrote:
> > > No need to create a new I/O context if there is none present yet in
> > > ->limit_depth.
> > >
> > > Signed-off-by: Christoph Hellwig <hch@lst.de>
> > > ---
> > > block/bfq-iosched.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
> > > index c990c6409c119..ecc2e57e68630 100644
> > > --- a/block/bfq-iosched.c
> > > +++ b/block/bfq-iosched.c
> > > @@ -663,7 +663,7 @@ static bool bfqq_request_over_limit(struct bfq_queue *bfqq, int limit)
> > > static void bfq_limit_depth(unsigned int op, struct blk_mq_alloc_data *data)
> > > {
> > > struct bfq_data *bfqd = data->q->elevator->elevator_data;
> > > - struct bfq_io_cq *bic = icq_to_bic(blk_mq_sched_get_icq(data->q));
> > > + struct bfq_io_cq *bic = bfq_bic_lookup(data->q);
> >
> > Maybe I'm missing something but bfq_limit_depth() needs to know to which
> > BFQ queue (and consequently blkcg) this IO is going to be added. And to be
> > able to lookup this queue we are using IO context. So AFAICT we need the
> > IO context allocated already in bfq_limit_depth()?
>
> But by allocating it you won't now anything, as it will still be empty.
You're right, we'll create only IO context and corresponding bfq_io_cq but
we won't actually create bfqq in bfq_limit_depth() anyway and without that
bfq_limit_depth() isn't going to do more. So your patch indeed does not
change anything in that regard.
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
next prev parent reply other threads:[~2021-11-30 10:26 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-26 11:58 cleanup I/O context handling Christoph Hellwig
2021-11-26 11:58 ` [PATCH 01/14] RDMA/qib: rename copy_io to qib_copy_io Christoph Hellwig
2021-11-26 11:58 ` [PATCH 02/14] fork: move copy_io to block/blk-ioc.c Christoph Hellwig
2021-11-26 11:58 ` [PATCH 03/14] bfq: simplify bfq_bic_lookup Christoph Hellwig
2021-11-26 11:58 ` [PATCH 04/14] bfq: use bfq_bic_lookup in bfq_limit_depth Christoph Hellwig
2021-11-29 16:09 ` Jan Kara
2021-11-30 6:39 ` Christoph Hellwig
2021-11-30 10:26 ` Jan Kara [this message]
2021-11-26 11:58 ` [PATCH 05/14] Revert "block: Provide blk_mq_sched_get_icq()" Christoph Hellwig
2021-11-26 11:58 ` [PATCH 06/14] block: mark put_io_context_active static Christoph Hellwig
2021-11-26 11:58 ` [PATCH 07/14] block: move blk_mq_sched_assign_ioc to blk-ioc.c Christoph Hellwig
2021-11-26 11:58 ` [PATCH 08/14] block: move the remaining elv.icq handling to the I/O scheduler Christoph Hellwig
2021-11-26 11:58 ` [PATCH 09/14] block: remove get_io_context_active Christoph Hellwig
2021-11-26 11:58 ` [PATCH 10/14] block: factor out a alloc_io_context helper Christoph Hellwig
2021-11-26 11:58 ` [PATCH 11/14] block: use alloc_io_context in __copy_io Christoph Hellwig
2021-11-26 11:58 ` [PATCH 12/14] block: return the io_context from create_task_io_context Christoph Hellwig
2021-11-26 11:58 ` [PATCH 13/14] block: simplify ioc_create_icq Christoph Hellwig
2021-11-26 11:58 ` [PATCH 14/14] block: simplify ioc_lookup_icq Christoph Hellwig
2021-11-27 13:40 ` cleanup I/O context handling Jens Axboe
2021-11-30 11:09 ` Jan Kara
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=20211130102606.GA7174@quack2.suse.cz \
--to=jack@suse.cz \
--cc=axboe@kernel.dk \
--cc=dennis.dalessandro@cornelisnetworks.com \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mike.marciniszyn@cornelisnetworks.com \
--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.