From: MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>
To: akpm@osdl.org, linux-kernel@vger.kernel.org,
ckrm-tech@lists.sourceforge.net
Cc: MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>
Subject: [PATCH 9/9] CPU controller - Documentation how to use the controller
Date: Fri, 28 Apr 2006 10:38:17 +0900 [thread overview]
Message-ID: <20060428013817.9582.60748.sendpatchset@moscone.dvs.cs.fujitsu.co.jp> (raw)
In-Reply-To: <20060428013730.9582.9351.sendpatchset@moscone.dvs.cs.fujitsu.co.jp>
9/9: cpu_docs
Documentation how to use the CPU controller
Signed-off-by: MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>
Signed-off-by: Kurosawa Takahiro <kurosawa@valinux.co.jp>
Documentation/res_groups/cpurc | 72 +++++++++++++++++++++++++++++++++++++++++
1 files changed, 72 insertions(+)
Index: linux-2.6.17-rc3/Documentation/res_groups/cpurc
===================================================================
--- /dev/null
+++ linux-2.6.17-rc3/Documentation/res_groups/cpurc
@@ -0,0 +1,73 @@
+Introduction
+------------
+
+CPU resource controller enables user/sysadmin to control CPU time
+percentage of tasks in a resouce group. It controls time_slice of tasks based on
+the feedback of difference between the target value and the current usage
+in order to control the percentage of the CPU usage to the target value.
+
+Installation
+------------
+
+1. Configure "CPU Resource Controller" under RES_GROUPS. Currently, this cannot
+be configured as a module.
+
+2. Reboot the system with the new kernel.
+
+3. Verify that the CPU resource controller is present by reading
+the file /config/res_groups/shares (should show a line with res=cpu).
+
+Assigning shares
+----------------
+
+Follows the general approach of setting shares for a resource group in Resource
+Groups.
+
+# echo "res=cpu,min_shares=val" > shares
+
+sets the min_shares of a resource group.
+
+The CPU resource controller calculates an effective min_shares in percent
+for each resoruce group. Following is an example of resource groups/min_shares
+settings and each effective min_shares.
+
+ /
+ effective_min_shares
+ = 100% - 50% - 30%
+ = 20%
+ +---------------+---------------+
+ /A min_shares=50% /B min_shares=30%
+ effective_min_shares effective_min_shares
+ = 50% - 10% - 25% = 30% - 0%
+ = 15% = 30%
++---------------+---------------+
+/C min_shares=20% /D min_shares=50%
+effective_min_shares effective_min_shares
+= 20% of 50% - 0% = 10% = 50% of 50% - 0 %
+= 10% = 25%
+
+If the min_shares in the resource group /A is changed 50% to 40% in the above
+example, the effective_min_shares of the resource group /A, /C and /D are
+automatically changed to 12%, 8% and 20% respectively.
+
+Although the child_shares_divisor can be changed, the effective_min_shares is
+always calculated in percent.
+
+Note that the CPU resource controller doesn't support the limit, so assigning
+the limit for "res=cpu" will have no effect.
+
+Monitoring
+----------
+
+stats file shows the effective min_shares and the current cpu usage of a resouce
+group in percentage.
+
+# cat stats
+cpu:effective_min_shares=50, load=40
+
+That means the effective min_shares of the resource group is 50% and the current
+load average of the resource group is 40%.
+
+Since the tasks in the resource group do not always try to consume CPU,
+the load could be less or greater than the effective_min_shares. Both cases
+are normal.
next prev parent reply other threads:[~2006-04-28 1:39 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-28 1:37 [PATCH 0/9] CPU controller MAEDA Naoaki
2006-04-28 1:37 ` [PATCH 1/9] CPU controller - Add class load estimation support MAEDA Naoaki
2006-04-28 1:37 ` [PATCH 2/9] CPU controller - Add class hungry detection support MAEDA Naoaki
2006-04-28 1:37 ` [PATCH 3/9] CPU controller - Add timeslice scaling support MAEDA Naoaki
2006-04-28 1:37 ` [PATCH 4/9] CPU controller - Add interface functions MAEDA Naoaki
2006-04-28 1:37 ` [PATCH 5/9] CPU controller - Documentation how the controller works MAEDA Naoaki
2006-04-28 1:38 ` [PATCH 6/9] CPU controller - Add basic functions and registering the controller MAEDA Naoaki
2006-04-28 1:38 ` [PATCH 7/9] CPU controller - Add routines to change share values and show stat MAEDA Naoaki
2006-04-28 1:38 ` [PATCH 8/9] CPU controller - Add cpu hotplug support MAEDA Naoaki
2006-04-28 1:38 ` MAEDA Naoaki [this message]
2006-04-28 5:25 ` [PATCH 0/9] CPU controller Mike Galbraith
2006-04-28 5:48 ` MAEDA Naoaki
2006-04-28 6:59 ` Mike Galbraith
2006-04-28 7:26 ` MAEDA Naoaki
2006-04-28 7:41 ` Mike Galbraith
2006-04-28 7:56 ` [ckrm-tech] " MAEDA Naoaki
2006-04-28 9:29 ` Mike Galbraith
2006-04-28 10:01 ` Mike Galbraith
2006-04-28 10:11 ` Con Kolivas
2006-04-28 12:07 ` MAEDA Naoaki
2006-04-28 13:09 ` Con Kolivas
2006-04-28 13:55 ` Hirokazu Takahashi
2006-04-28 14:55 ` Con Kolivas
2006-04-28 15:39 ` Mike Galbraith
2006-04-28 5:56 ` Kirill Korotaev
2006-04-28 7:11 ` Mike Galbraith
2006-04-28 7:46 ` Mike Galbraith
2006-04-28 8:13 ` Kirill Korotaev
2006-04-28 9:35 ` Mike Galbraith
2006-04-28 10:09 ` Con Kolivas
2006-04-28 10:16 ` Mike Galbraith
2006-04-28 10:26 ` Con Kolivas
2006-04-28 10:42 ` Mike Galbraith
2006-04-28 8:28 ` MAEDA Naoaki
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=20060428013817.9582.60748.sendpatchset@moscone.dvs.cs.fujitsu.co.jp \
--to=maeda.naoaki@jp.fujitsu.com \
--cc=akpm@osdl.org \
--cc=ckrm-tech@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®