public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/7] blkio-cgroup: Introduction
@ 2009-04-28 12:44 Ryo Tsuruta
  2009-04-28 12:44 ` [PATCH 2/7] blkio-cgroup: The new page_cgroup framework Ryo Tsuruta
  0 siblings, 1 reply; 10+ messages in thread
From: Ryo Tsuruta @ 2009-04-28 12:44 UTC (permalink / raw)
  To: linux-kernel, dm-devel, containers, virtualization, xen-devel

Hi all,

This is a new release of blkio-cgroup which provides an IO tracking
mechanism. You can also download this series of patches from
http://people.valinux.co.jp/~ryov/blkio-cgroup/

Changes from the previous release
=================================
- bio-cgroup renamed to blkio-cgroup.
- Use part of page_cgroup->flags to store the blkio-cgroup ID.
  This code is taken from Andrea's io-throttle.
  http://download.systemimager.org/~arighi/linux/patches/io-throttle/cgroup-io-throttle-v14.patch
- Add a new function blkio_cgroup_lookup(ID) which can be called from
  other cgroup subsystems and return the cgroup associated with a
  given blkio-cgroup ID. It makes it easy to use blkio-cgroup from other
  cgroup subsystems.
- Add an extra patch which reduces the overhead of IO tracking.
- Can be applied to 2.6.30-rc3 and 2.6.30-rc3-git3.

What's blkio-cgroup all about?
==============================

With this feature, you can determine the owners of any type of
I/Os. This makes dm-ioband_--_I/O_bandwidth_controller_-- be able to
control the Block I/O bandwidths even when it accepts delayed write
requests. Dm-ioband can find the owner cgroup of each request. It is
also possible that the other people who work on the I/O bandwidth
throttling use this functionality to control asynchronous I/Os with a
little enhancement.

Setting up blkio-cgroup
=======================

You have to apply the patch dm-ioband before applying this series of
blkio-cgroup patches.
And you have to select the following config options when compiling
kernel.

      CONFIG_CGROUPS=y
      CONFIG_CGROUP_BLKIO=y

And I recommend you should also select the options for cgroup memory
subsystem, because it makes it possible to give some I/O bandwidth and
some memory to a certain cgroup to control delayed write requests and
the processes in the cgroup will be able to make pages dirty only
inside the cgroup even when the given bandwidth is narrow.

      CONFIG_RESOURCE_COUNTERS=y
      CONFIG_CGROUP_MEM_RES_CTLR=y

Using blkio-cgroup
==================

The following shows how to use dm-ioband with cgroups. Please assume
that you want make two cgroups, which we call "bio cgroup" here, to
track down block I/Os and assign them to ioband device "ioband1".

First, mount the bio cgroup filesystem.

      # mount -t cgroup -o blkio none /cgroup

Then, make new bio cgroups and put some processes in them.

      # mkdir /cgroup/grp1
      # mkdir /cgroup/grp2
      # echo 1234 > /cgroup/grp1/tasks
      # echo 5678 > /cgroup/grp2/tasks

Now, check the ID of each blkio cgroup which is just created.

      # cat /cgroup/grp1/blkio.id
      2
      # cat /cgroup/grp2/blkio.id
      3

Finally, attach the cgroups to "ioband1" and assign them weights.

      # dmsetup message ioband1 0 type cgroup
      # dmsetup message ioband1 0 attach 2
      # dmsetup message ioband1 0 attach 3
      # dmsetup message ioband1 0 weight 2:30
      # dmsetup message ioband1 0 weight 3:60

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

end of thread, other threads:[~2009-05-04 22:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-28 12:44 [PATCH 1/7] blkio-cgroup: Introduction Ryo Tsuruta
2009-04-28 12:44 ` [PATCH 2/7] blkio-cgroup: The new page_cgroup framework Ryo Tsuruta
2009-04-28 12:45   ` [PATCH 3/7] blkio-cgroup: Refactoring io-context initialization Ryo Tsuruta
2009-04-28 12:46     ` [PATCH 4/7] blkio-cgroup: The body of blkio-cgroup Ryo Tsuruta
2009-04-28 12:46       ` [PATCH 5/7] blkio-cgroup: Page tracking hooks Ryo Tsuruta
2009-04-28 12:47         ` [PATCH 6/7] blkio-cgroup: Add a cgroup support to dm-ioband Ryo Tsuruta
2009-04-28 12:47           ` [PATCH 7/7] blkio-cgroup: Fast page tracking Ryo Tsuruta
2009-05-04 12:05       ` [PATCH 4/7] blkio-cgroup: The body of blkio-cgroup Andrea Righi
2009-05-04 12:39         ` Alan Cox
2009-05-04 22:43         ` Ryo Tsuruta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox