From: Tang Yizhou <tangyeechou@gmail.com>
To: Yang Xiuwei <yangxiuwei@kylinos.cn>, Tejun Heo <tj@kernel.org>,
Josef Bacik <josef@toxicpanda.com>, Jens Axboe <axboe@kernel.dk>
Cc: cgroups@vger.kernel.org, linux-block@vger.kernel.org
Subject: Re: [PATCH] block/cgroup: Drop stale -EBUSY retry from blkg_conf_prep()
Date: Thu, 16 Jul 2026 19:53:52 +0800 [thread overview]
Message-ID: <5d0fe256-c1c8-4cf5-a69c-a7e9afa08097@gmail.com> (raw)
In-Reply-To: <20260622085623.520209-1-yangxiuwei@kylinos.cn>
On 22/6/26 4:56 pm, Yang Xiuwei wrote:
> Since commit 8f4236d9008b ("block: remove QUEUE_FLAG_BYPASS and
> ->bypass") nothing in the blkcg blkg lookup/creation path
> returns -EBUSY anymore. blkg_conf_prep() nevertheless still
> retries at fail_exit with msleep(10) and restart_syscall()
> — logic added in 2012 when blk_queue_bypass() could
Hi Xiuwei,
Thanks for the cleanup.
Instead of the vague "logic added in 2012", please mention the commit
e56da7e28796 ("blkcg: don't allow or retain configuration of missing devices").
> cause blkg lookup/creation to fail with -EBUSY while the queue was
> temporarily bypassed during elevator changes.
>
> Signed-off-by: Yang Xiuwei <yangxiuwei@kylinos.cn>
> ---
> block/blk-cgroup.c | 10 ----------
> 1 file changed, 10 deletions(-)
>
> diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
> index 3093c1c03902..259f2240e7df 100644
> --- a/block/blk-cgroup.c
> +++ b/block/blk-cgroup.c
> @@ -919,16 +919,6 @@ int blkg_conf_prep(struct blkcg *blkcg, const struct blkcg_policy *pol,
> spin_unlock_irq(&q->queue_lock);
> fail_exit:
> mutex_unlock(&q->blkcg_mutex);
> - /*
> - * If queue was bypassing, we should retry. Do so after a
> - * short msleep(). It isn't strictly necessary but queue
> - * can be bypassing for some time and it's always nice to
> - * avoid busy looping.
> - */
> - if (ret == -EBUSY) {
> - msleep(10);
Since msleep() is gone, we can also remove #include <linux/delay.h>.
With the above addressed, feel free to add:
Reviewed-by: Tang Yizhou <yizhou.tang@shopee.com>
--
Best Regards,
Yi
> - ret = restart_syscall();
> - }
> return ret;
> }
> EXPORT_SYMBOL_GPL(blkg_conf_prep);
prev parent reply other threads:[~2026-07-16 11:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-22 8:56 [PATCH] block/cgroup: Drop stale -EBUSY retry from blkg_conf_prep() Yang Xiuwei
2026-06-23 1:33 ` Tao Cui
2026-07-16 11:53 ` Tang Yizhou [this message]
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=5d0fe256-c1c8-4cf5-a69c-a7e9afa08097@gmail.com \
--to=tangyeechou@gmail.com \
--cc=axboe@kernel.dk \
--cc=cgroups@vger.kernel.org \
--cc=josef@toxicpanda.com \
--cc=linux-block@vger.kernel.org \
--cc=tj@kernel.org \
--cc=yangxiuwei@kylinos.cn \
/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