From: Srivatsa Vaddagiri <vatsa@in.ibm.com>
To: Ingo Molnar <mingo@elte.hu>, Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Sam Vilain <sam@vilain.net>,
linux-kernel@vger.kernel.org, Kirill Korotaev <dev@openvz.org>,
Mike Galbraith <efault@gmx.de>, Balbir Singh <balbir@in.ibm.com>,
sekharan@us.ibm.com, Andrew Morton <akpm@osdl.org>,
nagar@watson.ibm.com, haveblue@us.ibm.com, pj@sgi.com
Subject: [RFC, PATCH 0/5] Going forward with Resource Management - A cpu controller
Date: Fri, 4 Aug 2006 10:37:53 +0530 [thread overview]
Message-ID: <20060804050753.GD27194@in.ibm.com> (raw)
Resource management has been talked about quite extensively in the
past, more recently in the context of containers. The basic requirement
here is to provide isolation between *groups* of task wrt their use
of various resources like CPU, Memory, I/O bandwidth, open file-descriptors etc.
Different maintainers have however expressed different opinions over the need to
complicate the kernel to meet this need, especially since it involves core
kernel code like the resource schedulers.
A BoF was hence held at OLS this year to come to a consensus on the minimum
requirements of a resource management solution for Linux kernel. Some notes
taken at the BoF are posted here:
http://www.uwsg.indiana.edu/hypermail/linux/kernel/0607.3/0896.html
An important consensus point of the BoF seemed to be "focus on real
controllers more, preferably memory first, using some simple interface
and task grouping mechanism".
In going forward, following points will need to be addressed:
- Grouping and interface
- What mechanism to use for grouping tasks and
for specifying task-group resource usage limits?
- Design of individual resource controllers like memory and cpu
This patch series is an attempt to take forward the design discussion of a
CPU controller.
For simplicity and convenience, cpuset has been chosen as the means to group
tasks here, primarily because cpuset already exists in the kernel and also
perhaps resource container definition should be unique only inside a cpuset.
Also I think the controller design can be independent of the grouping
interface and hence can work with any other grouping interface we may
settle on finally for resource management.
Other salient notes about this CPU controller:
- Is work-in-progress! I am sending this early so that I can get
some feedback on the general direction in which to proceed
further.
- Works only on UP for now (boot with maxcpus=1). IMO group-aware SMP
load-balancing can be met using smpnice feature. I will work on this
feature next.
- Only soft-limit is supported (work-conserving).
- Each task-group gets its own runqueue on every cpu.
- In addition, there is an active and expired array of
task-groups themselves. Task-groups who have expired their
quota are put into expired array.
- Task-groups have priorities. Priority of a task-group is the
same as the priority of the highest-priority runnable task it
has. This I feel will retain interactiveness of the system
as it is today.
- Scheduling the next task involves picking highest priority
task-group from active array first and then picking highest-priority
task within it. Both steps are O(1).
- Token are assigned to task-groups based on their assigned quota. Once
they run out of tokens, the task-group is put in an expired array.
Array switch happens when active array is empty.
- Although the algorithm is very simple, it perhaps needs more
refinement to handle different cases. Especially I feel task-groups
which are idle most of the time and experience bursts once in a while
will need to be handled better than in this simple scheme.
I would love to hear your comments on these design aspects of the
controller.
--
Regards,
vatsa
next reply other threads:[~2006-08-04 5:03 UTC|newest]
Thread overview: 78+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-04 5:07 Srivatsa Vaddagiri [this message]
2006-08-04 5:09 ` [ RFC, PATCH 1/5 ] CPU controller - base changes Srivatsa Vaddagiri
2006-08-04 7:35 ` Andrew Morton
2006-08-04 11:18 ` Srivatsa Vaddagiri
2006-08-04 14:34 ` Kirill Korotaev
2006-08-04 14:50 ` Balbir Singh
2006-08-04 14:51 ` Srivatsa Vaddagiri
2006-08-04 5:10 ` [ RFC, PATCH 2/5 ] CPU controller - Define group operations Srivatsa Vaddagiri
2006-08-04 23:10 ` Jiri Slaby
2006-08-04 5:11 ` [ RFC, PATCH 3/5 ] CPU controller - deal with movement of tasks Srivatsa Vaddagiri
2006-08-04 5:12 ` [ RFC, PATCH 4/5 ] CPU controller - deal with dont care groups Srivatsa Vaddagiri
2006-08-04 5:13 ` [ RFC, PATCH 5/5 ] CPU controller - interface with cpusets Srivatsa Vaddagiri
2006-08-04 5:36 ` [RFC, PATCH 0/5] Going forward with Resource Management - A cpu controller Andrew Morton
2006-08-04 5:42 ` Andrew Morton
2006-08-04 9:49 ` Alan Cox
2006-08-04 11:41 ` Srivatsa Vaddagiri
2006-08-04 14:51 ` Kirill Korotaev
2006-08-04 15:31 ` Srivatsa Vaddagiri
2006-08-04 16:03 ` Kirill Korotaev
2006-08-04 17:02 ` [ProbableSpam] " Shailabh Nagar
2006-08-04 18:27 ` Rohit Seth
2006-08-04 19:11 ` Shailabh Nagar
2006-08-04 19:24 ` Rohit Seth
2006-08-07 7:19 ` Kirill Korotaev
2006-08-07 17:14 ` Rohit Seth
2006-08-08 7:17 ` Kirill Korotaev
2006-08-08 17:16 ` Rohit Seth
2006-08-04 17:50 ` Martin Bligh
2006-08-07 7:25 ` Kirill Korotaev
2006-08-07 14:34 ` Martin J. Bligh
2006-08-07 16:33 ` Kirill Korotaev
2006-08-07 18:31 ` Rohit Seth
2006-08-07 18:43 ` Dave Hansen
2006-08-07 19:00 ` Rohit Seth
2006-08-07 19:46 ` Martin Bligh
2006-08-08 14:19 ` memory resource accounting (was Re: [RFC, PATCH 0/5] Going forward with Resource Management - A cpu controller) Nick Piggin
2006-08-08 14:57 ` Dave Hansen
2006-08-08 15:22 ` Nick Piggin
2006-08-09 13:43 ` Kirill Korotaev
2006-08-08 17:08 ` Martin Bligh
2006-08-09 1:54 ` Nick Piggin
2006-08-08 17:34 ` Rohit Seth
2006-08-09 4:33 ` Andi Kleen
2006-08-09 6:00 ` Magnus Damm
2006-08-09 6:06 ` Andi Kleen
2006-08-09 6:56 ` Andrey Savochkin
2006-08-08 7:19 ` [RFC, PATCH 0/5] Going forward with Resource Management - A cpu controller Kirill Korotaev
2006-08-04 16:16 ` Kirill Korotaev
2006-08-04 16:49 ` [ProbableSpam] " Shailabh Nagar
2006-08-04 17:03 ` Dipankar Sarma
2006-08-04 18:17 ` Shailabh Nagar
2006-08-07 7:23 ` Kirill Korotaev
2006-08-04 14:57 ` Kirill Korotaev
2006-08-04 5:58 ` Paul Jackson
2006-08-04 6:02 ` Paul Jackson
2006-08-04 6:16 ` Paul Jackson
2006-08-04 6:20 ` Dipankar Sarma
2006-08-04 6:31 ` Paul Jackson
2006-08-04 6:37 ` Dipankar Sarma
2006-08-04 6:49 ` Andrew Morton
2006-08-04 6:45 ` Andrew Morton
2006-08-04 7:10 ` Dipankar Sarma
2006-08-04 7:24 ` Andrew Morton
2006-08-04 19:10 ` Chandra Seetharaman
2006-08-04 6:56 ` Srivatsa Vaddagiri
2006-08-04 7:13 ` Andrew Morton
2006-08-04 11:16 ` Srivatsa Vaddagiri
2006-08-04 18:51 ` Andrew Morton
2006-08-04 14:20 ` Kirill Korotaev
2006-08-04 14:35 ` Christoph Hellwig
2006-08-04 15:29 ` [ProbableSpam] " Shailabh Nagar
2006-08-07 7:29 ` Kirill Korotaev
2006-08-07 9:30 ` Paul Jackson
2006-08-07 15:58 ` Chandra Seetharaman
2006-08-07 16:10 ` Kirill Korotaev
2006-08-07 17:15 ` Paul Jackson
2006-08-07 18:19 ` Rohit Seth
2006-08-05 3:30 ` Nick Piggin
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=20060804050753.GD27194@in.ibm.com \
--to=vatsa@in.ibm.com \
--cc=akpm@osdl.org \
--cc=balbir@in.ibm.com \
--cc=dev@openvz.org \
--cc=efault@gmx.de \
--cc=haveblue@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=nagar@watson.ibm.com \
--cc=nickpiggin@yahoo.com.au \
--cc=pj@sgi.com \
--cc=sam@vilain.net \
--cc=sekharan@us.ibm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.