From patchwork Fri Oct 2 11:58:43 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryo Tsuruta X-Patchwork-Id: 51339 Received: from hormel.redhat.com (hormel1.redhat.com [209.132.177.33]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n92BwsRj004940 for ; Fri, 2 Oct 2009 11:58:54 GMT Received: from listman.util.phx.redhat.com (listman.util.phx.redhat.com [10.8.4.110]) by hormel.redhat.com (Postfix) with ESMTP id 0EE3061958F; Fri, 2 Oct 2009 07:58:54 -0400 (EDT) Received: from int-mx01.intmail.prod.int.phx2.redhat.com (nat-pool.util.phx.redhat.com [10.8.5.200]) by listman.util.phx.redhat.com (8.13.1/8.13.1) with ESMTP id n92BwrgU029513 for ; Fri, 2 Oct 2009 07:58:53 -0400 Received: from mx1.redhat.com (ext-mx07.extmail.prod.ext.phx2.redhat.com [10.5.110.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n92Bwrds027182 for ; Fri, 2 Oct 2009 07:58:53 -0400 Received: from mail.valinux.co.jp (mail.valinux.co.jp [210.128.90.3]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n92BwhiZ013244 for ; Fri, 2 Oct 2009 07:58:43 -0400 Received: from localhost (kappa.local.valinux.co.jp [172.16.2.46]) by mail.valinux.co.jp (Postfix) with ESMTP id 1748349CE6; Fri, 2 Oct 2009 20:58:43 +0900 (JST) Date: Fri, 02 Oct 2009 20:58:43 +0900 (JST) Message-Id: <20091002.205843.183050041.ryov@valinux.co.jp> To: linux-kernel@vger.kernel.org, dm-devel@redhat.com, containers@lists.linux-foundation.org, virtualization@lists.linux-foundation.org, xen-devel@lists.xensource.com From: Ryo Tsuruta In-Reply-To: <20091002.205817.112597159.ryov@valinux.co.jp> References: <20091002.205725.104059507.ryov@valinux.co.jp> <20091002.205748.189700030.ryov@valinux.co.jp> <20091002.205817.112597159.ryov@valinux.co.jp> Mime-Version: 1.0 X-Virus-Scanned: clamav-milter 0.95.2 at va-mail.local.valinux.co.jp X-Virus-Status: Clean X-RedHat-Spam-Score: -0.544 (AWL) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-Scanned-By: MIMEDefang 2.67 on 10.5.110.11 X-loop: dm-devel@redhat.com Cc: Subject: [dm-devel] [PATCH 7/9] blkio-cgroup-v13: The document of blkio-cgroup X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.5 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com Index: linux-2.6.32-rc1/Documentation/cgroups/00-INDEX =================================================================== --- linux-2.6.32-rc1.orig/Documentation/cgroups/00-INDEX +++ linux-2.6.32-rc1/Documentation/cgroups/00-INDEX @@ -16,3 +16,5 @@ memory.txt - Memory Resource Controller; design, accounting, interface, testing. resource_counter.txt - Resource Counter API. +blkio.txt + - Block I/O Tracking; description, interface and examples. Index: linux-2.6.32-rc1/Documentation/cgroups/blkio.txt =================================================================== --- /dev/null +++ linux-2.6.32-rc1/Documentation/cgroups/blkio.txt @@ -0,0 +1,49 @@ +Block I/O Cgroup + +1. Overview + +Using this feature the owners of any type of I/O can be determined. +This allows dm-ioband to control block I/O bandwidth even when it is +accepting delayed write requests. dm-ioband can find the cgroup of +each request. It is also for possible that others working on I/O +bandwidth throttling to use this functionality to control asynchronous +I/O with a little enhancement. + +2. Setting up blkio-cgroup + +The following kernel config options are required. + +CONFIG_CGROUPS=y +CONFIG_CGROUP_BLKIO=y + +Selecting the options for the cgroup memory subsystem is also recommended +as it makes it possible to give some I/O bandwidth and memory to a selected +cgroup to control delayed write requests. The amount of dirty pages is +limited within the cgroup even if the allocated bandwidth is narrow. + +CONFIG_RESOURCE_COUNTERS=y +CONFIG_CGROUP_MEM_RES_CTLR=y + +3. User interface + +3.1 Mounting the cgroup filesystem + +First, mount the cgroup filesystem in order to enable observation and +modification of the blkio-cgroup settings. + +# mount -t cgroup -o blkio none /cgroup + +3.2 The blkio.id file + +After mounting the cgroup filesystem the blkio.id file will be visible +in the cgroup directory. This file contains a unique ID number for +each cgroup. When an I/O operation starts, blkio-cgroup sets the +page's ID number on the page cgroup. The cgroup of I/O can be +determined by retrieving the ID number from the page cgroup, because +the page cgroup is associated with the page which is involved in the +I/O. + +4. Contact + +Linux Block I/O Bandwidth Control Project +http://sourceforge.net/projects/ioband/