[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <492545CC.6000909@cn.fujitsu.com>
Date: Thu, 20 Nov 2008 19:11:08 +0800
From: Gui Jianfeng <guijianfeng@...fujitsu.com>
To: Andrea Righi <righi.andrea@...il.com>,
Ryo Tsuruta <ryov@...inux.co.jp>,
Hirokazu Takahashi <taka@...inux.co.jp>
CC: menage@...gle.com, containers@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Subject: [PATCH 3/7] Introduction for new feature
Documentation of using bio-cgroup in io-throttle.
Signed-off-by: Gui Jianfeng <guijianfeng@...fujitsu.com>
---
Documentation/controllers/io-throttle.txt | 29 ++++++++++++++++++++++++++++-
1 files changed, 28 insertions(+), 1 deletions(-)
diff --git a/Documentation/controllers/io-throttle.txt b/Documentation/controllers/io-throttle.txt
index 2a3bbd1..d3510ae 100644
--- a/Documentation/controllers/io-throttle.txt
+++ b/Documentation/controllers/io-throttle.txt
@@ -223,7 +223,34 @@ $ cat /proc/$$/io-throttle-stat
\ \_______global bandwidth sleep (clock ticks)
\________global bandwidth counter
-2.4. Examples
+2.4. Buffered-io tracking
+bio-cgroup can be used to track buffered-io(in delay-write condition) and for
+proper throttling. You can directly mount io-throttle and bio-cgroup together
+to track buffered-io. An alternative choice is making use of bio-cgroup id. An
+association between a given io-throttle cgroup and a given bio-cgroup cgroup can
+be built by echo a bio-cgroup id to the file blockio.bio_id. This file is exported
+for the purpose of associating io-throttle and bio-cgroup groups. If you'd like to
+create an association, you must ensure the io-throttle group is empty, that is,
+there are no tasks in this group. otherwise, association creating will fail. If an
+association is successfully built, task moving in this group will be denied. Of
+course, you can remove an association, just echo an negative number into
+blockio.bio_id.
+
+Example:
+* Create an association between a given io-throttle group and a given bio-cgroup
+group.
+$ mount -t cgroup -o bio bio-cgroup /mnt/bio-cgroup/
+$ cd /mnt/bio-cgroup/
+$ mkdir bio-grp
+$ cat bio-grp/bio.id
+1
+
+$ mount -t cgroup -o blockio blockio /mnt/throttle
+$ cd /mnt/throttle
+$ mkdir foo
+$ echo 1 > foo/blockio.bio_id
+
+2.5. Examples
* Mount the cgroup filesystem (blockio subsystem):
# mkdir /mnt/cgroup
-- 1.5.4.rc3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists