linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 0/4] dm thin: support blk-throttle on data and metadata device
@ 2017-01-20 11:15 Hou Tao
  2017-01-20 11:15 ` [PATCH RFC 1/4] dm thin: add a pool feature "keep_bio_blkcg" Hou Tao
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Hou Tao @ 2017-01-20 11:15 UTC (permalink / raw)
  To: dm-devel, linux-block; +Cc: agk, snitzer, ejt, vgoyal

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.

Tao

Hou Tao (4):
  dm thin: add a pool feature "keep_bio_blkcg"
  dm thin: parse "keep_bio_blkcg" from userspace tools
  dm thin: show the enabled status of keep_bio_blkcg feature
  dm thin: associate bio with current task if keep_bio_blkcg is enabled

 drivers/md/dm-thin.c | 26 ++++++++++++++++++++++++--
 drivers/md/dm-thin.h | 17 +++++++++++++++++
 2 files changed, 41 insertions(+), 2 deletions(-)
 create mode 100644 drivers/md/dm-thin.h

-- 
2.5.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-01-20 15:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2017-01-20 15:56   ` Vivek Goyal

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).