public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: "yukuai (C)" <yukuai3@huawei.com>
Cc: Jan Kara <jack@suse.cz>,
	linux-block@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
	Paolo Valente <paolo.valente@linaro.org>,
	stable@vger.kernel.org
Subject: Re: [PATCH 2/3] bfq: Avoid merging queues with different parents
Date: Mon, 3 Jan 2022 14:16:54 +0100	[thread overview]
Message-ID: <20220103131654.7seobu6gqhigjv2m@quack3> (raw)
In-Reply-To: <fec7558a-1559-dae0-fe21-d11876dc7473@huawei.com>

On Fri 24-12-21 09:45:02, yukuai (C) wrote:
> 在 2021/12/24 1:31, Jan Kara 写道:
> > diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
> > index 056399185c2f..0da47f2ca781 100644
> > --- a/block/bfq-iosched.c
> > +++ b/block/bfq-iosched.c
> > @@ -2638,6 +2638,14 @@ bfq_setup_merge(struct bfq_queue *bfqq, struct bfq_queue *new_bfqq)
> >   	if (process_refs == 0 || new_process_refs == 0)
> >   		return NULL;
> > +	/*
> > +	 * Make sure merged queues belong to the same parent. Parents could
> > +	 * have changed since the time we decided the two queues are suitable
> > +	 * for merging.
> > +	 */
> > +	if (new_bfqq->entity.parent != bfqq->entity.parent)
> > +		return NULL;
> > +
> Hi,
> 
> This seems unnecessary, the caller of bfq_setup_merge() aready make sure
> bfqq and new_bfqq are under the same bfqg. Am I missing something?

Not all the callers of bfq_setup_merge() check that queues belong to the
same cgroup (e.g. bfq_setup_cooperator() does not seem to check).

								Honza

> 
> Thanks,
> Kuai
> >   	bfq_log_bfqq(bfqq->bfqd, bfqq, "scheduling merge with queue %d",
> >   		new_bfqq->pid);
> > 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

  reply	other threads:[~2022-01-06 15:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20211223171425.3551-1-jack@suse.cz>
2021-12-23 17:31 ` [PATCH 1/3] bfq: Avoid false marking of bic as stably merged Jan Kara
2021-12-23 17:31 ` [PATCH 2/3] bfq: Avoid merging queues with different parents Jan Kara
2021-12-24  1:45   ` yukuai (C)
2022-01-03 13:16     ` Jan Kara [this message]
2021-12-23 17:31 ` [PATCH 3/3] bfq: Split shared queues on move between cgroups 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=20220103131654.7seobu6gqhigjv2m@quack3 \
    --to=jack@suse.cz \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=paolo.valente@linaro.org \
    --cc=stable@vger.kernel.org \
    --cc=yukuai3@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