From: Mike Snitzer <snitzer@redhat.com>
To: Jeff Moyer <jmoyer@redhat.com>
Cc: Hou Tao <houtao1@huawei.com>,
dm-devel@redhat.com, linux-block@vger.kernel.org, agk@redhat.com,
ejt@redhat.com, vgoyal@redhat.com
Subject: Re: [PATCH RFC 0/4] dm thin: support blk-throttle on data and metadata device
Date: Fri, 20 Jan 2017 10:41:52 -0500 [thread overview]
Message-ID: <20170120154152.GA2933@redhat.com> (raw)
In-Reply-To: <x49bmv192th.fsf@segfault.boston.devel.redhat.com>
On Fri, Jan 20 2017 at 10:19am -0500,
Jeff Moyer <jmoyer@redhat.com> wrote:
> Hou Tao <houtao1@huawei.com> writes:
>
> > Hi all,
> >
> > We need to throttle the O_DIRECT IO on data and metadata device
> > of a dm-thin pool and encounter some problems. If we set the
> > limitation on the root blkcg, the throttle works. If we set the
> > limitation on a child blkcg, the throttle doesn't work well.
> >
> > The reason why the throttle doesn't work is that dm-thin defers
> > the process of bio when the physical block of bio has not been
> > allocated. The bio will be submitted by the pool worker, and the
> > blkcg of the bio will be the blkcg of the pool worker, namely,
> > the root blkcg instead of the blkcg of the original IO thread.
> > We only set a limitation on the blkcg of the original IO thread,
> > so the blk-throttle doesn't work well.
> >
> > In order to handle the situation, we add a "keep_bio_blkcg" feature
> > to dm-thin. If the feature is enabled, the original blkcg of bio
> > will be saved at thin_map() and will be used during blk-throttle.
>
> Why is this even an option? I would think that you would always want
> this behavior.
Right, shouldn't be an optional feature.
Also, this implementation is very dm-thin specific. I still have this
line of work on my TODO because there should be a more generic way to
wire up these associations in either block core or DM core.
Now that there is both dm-crypt and dm-thin specific RFC patches to fix
this I'll see about finding a solution that works for both but that is
more generic.
Not sure how quickly I'll get to this but I'll do my best.
next prev parent reply other threads:[~2017-01-20 15:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-20 11:15 [PATCH RFC 0/4] dm thin: support blk-throttle on data and metadata device Hou Tao
2017-01-20 11:15 ` [PATCH RFC 1/4] dm thin: add a pool feature "keep_bio_blkcg" Hou Tao
2017-01-20 11:15 ` [PATCH RFC 2/4] dm thin: parse "keep_bio_blkcg" from userspace tools Hou Tao
2017-01-20 11:15 ` [PATCH RFC 3/4] dm thin: show the enabled status of keep_bio_blkcg feature Hou Tao
2017-01-20 11:15 ` [PATCH RFC 4/4] dm thin: associate bio with current task if keep_bio_blkcg is enabled Hou Tao
2017-01-20 15:19 ` [PATCH RFC 0/4] dm thin: support blk-throttle on data and metadata device Jeff Moyer
2017-01-20 15:41 ` Mike Snitzer [this message]
2017-01-20 15:56 ` Vivek Goyal
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=20170120154152.GA2933@redhat.com \
--to=snitzer@redhat.com \
--cc=agk@redhat.com \
--cc=dm-devel@redhat.com \
--cc=ejt@redhat.com \
--cc=houtao1@huawei.com \
--cc=jmoyer@redhat.com \
--cc=linux-block@vger.kernel.org \
--cc=vgoyal@redhat.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;
as well as URLs for NNTP newsgroup(s).