From: Jens Axboe <axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org>
To: Jinke Han <hanjinke.666-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org>,
tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
Cc: linux-block-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v2] block: don't allow the same type rq_qos add more than once
Date: Tue, 19 Jul 2022 09:53:55 -0600 [thread overview]
Message-ID: <724b2b60-d32c-0785-dfe9-79e208f8f662@kernel.dk> (raw)
In-Reply-To: <20220719070258.25721-1-hanjinke.666-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org>
On 7/19/22 1:02 AM, Jinke Han wrote:
> From: Jinke Han <hanjinke.666-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org>
>
> In our test of iocost, we encounttered some list add/del corrutions of
encountered and corruptions
> inner_walk list in ioc_timer_fn.
>
> The reason can be descripted as follow:
described
> cpu 0 cpu 1
> ioc_qos_write ioc_qos_write
>
> ioc = q_to_ioc(bdev_get_queue(bdev));
> if (!ioc) {
> ioc = kzalloc(); ioc = q_to_ioc(bdev_get_queue(bdev));
> if (!ioc) {
> ioc = kzalloc();
> ...
> rq_qos_add(q, rqos);
> }
> ...
> rq_qos_add(q, rqos);
> ...
> }
>
> When the io.cost.qos file is written by two cpu concurrently, rq_qos may
two cpus
> be added to one disk twice. In that case, there will be two iocs enabled
> and running on one disk. They own different iocgs on their active list.
> In the ioc_timer_fn function, because of the iocgs from two ioc have the
> same root iocg, the root iocg's walk_list may be overwritten by each
> other and this lead to list add/del corrutions in building or destorying
leads to, corruptions, destroying.
Outside of the spelling and grammer which I typically just fix up while
applying, this one doesn't apply to for-5.20/block. Please check and
resend it.
--
Jens Axboe
WARNING: multiple messages have this Message-ID (diff)
From: Jens Axboe <axboe@kernel.dk>
To: Jinke Han <hanjinke.666@bytedance.com>, tj@kernel.org
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
cgroups@vger.kernel.org
Subject: Re: [PATCH v2] block: don't allow the same type rq_qos add more than once
Date: Tue, 19 Jul 2022 09:53:55 -0600 [thread overview]
Message-ID: <724b2b60-d32c-0785-dfe9-79e208f8f662@kernel.dk> (raw)
In-Reply-To: <20220719070258.25721-1-hanjinke.666@bytedance.com>
On 7/19/22 1:02 AM, Jinke Han wrote:
> From: Jinke Han <hanjinke.666@bytedance.com>
>
> In our test of iocost, we encounttered some list add/del corrutions of
encountered and corruptions
> inner_walk list in ioc_timer_fn.
>
> The reason can be descripted as follow:
described
> cpu 0 cpu 1
> ioc_qos_write ioc_qos_write
>
> ioc = q_to_ioc(bdev_get_queue(bdev));
> if (!ioc) {
> ioc = kzalloc(); ioc = q_to_ioc(bdev_get_queue(bdev));
> if (!ioc) {
> ioc = kzalloc();
> ...
> rq_qos_add(q, rqos);
> }
> ...
> rq_qos_add(q, rqos);
> ...
> }
>
> When the io.cost.qos file is written by two cpu concurrently, rq_qos may
two cpus
> be added to one disk twice. In that case, there will be two iocs enabled
> and running on one disk. They own different iocgs on their active list.
> In the ioc_timer_fn function, because of the iocgs from two ioc have the
> same root iocg, the root iocg's walk_list may be overwritten by each
> other and this lead to list add/del corrutions in building or destorying
leads to, corruptions, destroying.
Outside of the spelling and grammer which I typically just fix up while
applying, this one doesn't apply to for-5.20/block. Please check and
resend it.
--
Jens Axboe
next prev parent reply other threads:[~2022-07-19 15:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-19 7:02 [PATCH v2] block: don't allow the same type rq_qos add more than once Jinke Han
2022-07-19 7:02 ` Jinke Han
[not found] ` <20220719070258.25721-1-hanjinke.666-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org>
2022-07-19 15:50 ` Tejun Heo
2022-07-19 15:50 ` Tejun Heo
2022-07-19 15:53 ` Jens Axboe [this message]
2022-07-19 15:53 ` 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=724b2b60-d32c-0785-dfe9-79e208f8f662@kernel.dk \
--to=axboe-tswwg44o7x1aa/9udqfwiw@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=hanjinke.666-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org \
--cc=linux-block-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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.