All of lore.kernel.org
 help / color / mirror / Atom feed
From: Srivatsa Vaddagiri <vatsa@in.ibm.com>
To: Andrew Morton <akpm@osdl.org>
Cc: mingo@elte.hu, nickpiggin@yahoo.com.au, sam@vilain.net,
	linux-kernel@vger.kernel.org, dev@openvz.org, efault@gmx.de,
	balbir@in.ibm.com, sekharan@us.ibm.com, nagar@watson.ibm.com,
	haveblue@us.ibm.com, pj@sgi.com
Subject: Re: [RFC, PATCH 0/5] Going forward with Resource Management - A cpu controller
Date: Fri, 4 Aug 2006 16:46:38 +0530	[thread overview]
Message-ID: <20060804111638.GA28490@in.ibm.com> (raw)
In-Reply-To: <20060804001342.1168e5ab.akpm@osdl.org>

On Fri, Aug 04, 2006 at 12:13:42AM -0700, Andrew Morton wrote:
> There was a lot of discussion last time - Mike, Ingo, others.  It would be
> a useful starting point if we could be refreshed on what the main issues
> were, and whether/how this new patchset addresses them.

The main issues raised against the CPU controller posted last time were
these:

(ref : http://lkml.org/lkml/2006/4/20/404)

a. Interactive tasks not handled
	The patch, which was mainly based on scaling down timeslice of tasks 
	that are above their guarantee, left interactive tasks untouched. This 
	meant that interactive tasks could run uncontrolled and would have 
	affected the guaranteed bandwidth provided for other tasks.

b. Task groups with uncontrolled number of tasks not handled well
	The patch retained current single runqueue per-cpu. Thus the runqueue 
	would contain a mixture of tasks belonging to different groups. Also 
	each task was given a minimum timeslice of 1 tick. This meant that we 
	could not limit the CPU bandwidth of a group that has a large number of 
	tasks to the desired extent.

c. SMP-correctness not implemented
	 Guaranteed bandwidth wasn't observed on all CPUs put together

d. Supported only guaranteed bandwidth and not soft/hard limit.

e. Bursty workloads not handled well
	Scaling down of timeslice, to meet the increased demand of 
	higher-guaranteed task-groups, was not instantaneous. Rather 
   	timeslice was scaled down when tasks expired their timeslice
   	and were moved to expired array. This meant that bursty workloads
   	would get their due share rather slowly.

Apart from these, the other observation I had was that:

f. Incorrect load accounting?
	Load of a task was accounted only when it expired its timeslice, rather 
	than while it was running. This IMO can lead to improper observation of 
	load a task-group has on a given CPU at times and thus affect
	guaranteed bandwidth for other task-groups.

Could we have overcome all these issue with slight changes to the
design? Hard to say. IMHO we get better control only by segregating tasks
into different runqueues and getting control over which task-group to
schedule next, which is what this new patch attempts to do.

In summary, the patch should address limitations a, b, e and f. I am hoping to 
address c using smpnice approach. Regarding d, this patch provides more
of a soft-limit feature. Some guaranteed usage for task-groups can still
be met, I feel, by limiting the CPU usage of other groups.

To take all this forward, these significant points need to be decided
for a CPU controller:

1. Do we want to split the current 1 runqueue per-CPU into 1 runqueue
   per-task-group per-CPU?

2. How should task-group priority be decided? The decision we take for
   this impacts interactivity of the system. In my patch, I attempt to
   retain good interactivty by letting task-group priority be decided by
   the highest priority task it has.

3. How do we accomplish SMP correctness for task-group bandwidth?
   I believe OpenVZ uses virtual runqueues, which simplifies 
   load balancing a bit, though not sure if that is at the expense
   of increased lock contention. IMHO we can try going smpnice route and
   see how far that can take us.

Ingo/Nick, what are your thoughts here?

-- 
Regards,
vatsa

  reply	other threads:[~2006-08-04 11:12 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-04  5:07 [RFC, PATCH 0/5] Going forward with Resource Management - A cpu controller Srivatsa Vaddagiri
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 [this message]
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=20060804111638.GA28490@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.