From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Morten Rasmussen <Morten.Rasmussen@arm.com>
Cc: Paul Turner <pjt@google.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Venki Pallipadi <venki@google.com>,
Srivatsa Vaddagiri <vatsa@in.ibm.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Mike Galbraith <efault@gmx.de>,
Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>,
Ben Segall <bsegall@google.com>, Ingo Molnar <mingo@elte.hu>,
Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>,
Robin Randhawa <Robin.Randhawa@arm.com>,
linaro-sched-sig@lists.linaro.org
Subject: Re: [RFC PATCH 00/14] sched: entity load-tracking re-work
Date: Tue, 13 Mar 2012 09:44:03 -0700 [thread overview]
Message-ID: <20120313164403.GJ2349@linux.vnet.ibm.com> (raw)
In-Reply-To: <20120312103927.GB25134@e103034-lin.cambridge.arm.com>
On Mon, Mar 12, 2012 at 10:39:27AM +0000, Morten Rasmussen wrote:
> On Thu, Feb 02, 2012 at 01:38:26AM +0000, Paul Turner wrote:
> > As referenced above this also allows us to potentially improve decisions within
> > the load-balancer, for both distribution and power-management.
> >
> > Exmaple: consider 1x80% task and 2x40% tasks on a 2-core machine. It's
> > currently a bit of a gamble as to whether you get an {AB, B} or {A,
> > BB} split since they have equal weight (assume 1024). With per-task
> > tracking we can actually consider them at their contributed weight and
> > see a stable ~{800,{400, 400}} load-split. Likewise within balance_tasks we can
> > consider the load migrated to be that actually contributed.
>
> Hi Paul (and LKML),
Hello, Morten!
> As a follow up to the discussions held during the scheduler mini-summit
> at the last Linaro Connect I would like to share what I (working for
> ARM) have observed so far in my experiments with big.LITTLE scheduling.
>
> I see task affinity on big.LITTLE systems as a combination of
> user-space affinity (via cgroups+cpuset etc) and introspective affinity
> as result of intelligent load balancing in the scheduler. I see the
> entity load tracking in this patch set as a step towards the latter. I
> am very interested in better task profiling in the scheduler as this is
> crucial for selecting which tasks that should go on which type of core.
>
> I am using the patches for some very crude experiments with scheduling
> on big.LITTLE to explore possibilities and learn about potential issues.
> What I want to achieve is that high priority CPU-intensive tasks will
> be scheduled on fast and less power-efficient big cores and background
> tasks will be scheduled on power-efficient little cores. At the same
> time I would also like to minimize the performance impact experienced
> by the user. The following is a summary of the observation that I have
> made so far. I would appreciate comments and suggestions on the best way
> to go from here.
>
> I have set up two sched_domains on a 4-core ARM system with two cores
> each that represents big and little clusters and disabled load balancing
> between them. The aim is to separate heavy and high priority tasks from
> less important tasks using the two domains. Based on load_avg_contrib
> tasks will be assigned to one of the domains by select_task_rq().
> However, this does not work out very well. If a task in the little
> domain suddenly consumes more CPU time and never goes to sleep it will
> never get the chance to migrate to the big domain. On a homogeneous
> system it doesn't really matter _where_ a task goes if imbalance is
> unavoidable as all cores have equal performance. For heterogeneous
> systems like big.LITTLE it makes a huge difference. To mitigate this
> issue I am periodically checking the currently running task on each
> little core to see if a CPU-intensive task is stuck there. If there is
> it will be migrated to a core in the big domain using
> stop_one_cpu_nowait() similar to the active load balance mechanism. It
> is not a pretty solution, so I am open for suggestions. Furthermore, by
> only checking the current task there is a chance of missing busy tasks
> waiting on the runqueue but checking the entire runqueue seems too
> expensive.
>
> My observations are based on a simple mobile workload modelling web
> browsing. That is basically two threads waking up occasionally to render
> a web page. Using my current setup the most CPU intensive of the two
> will be scheduled on the big cluster as intended. The remaining
> background threads are always on the little cluster leaving the big
> cluster idle when it is not rendering to save power. The
> task-stuck-on-little problem can most easily be observed with CPU
> intensive workloads such the sysbench CPU workload.
>
> I have looked at traces of both runnable time and usage time trying to
> understand why you use runnable time as your load metric and not usage
> time which seems more intuitive. What I see is that runnable time
> depends on the total runqueue load. If you have many tasks on the
> runqueue they will wait longer and therefore have higher individual
> load_avg_contrib than they would if the were scheduled across more CPUs.
> Usage time is also affected by the number of tasks on the runqueue as
> more tasks means less CPU time. However, less usage can also just mean
> that the task does not execute very often. This would make a load
> contribution estimate based on usage time less accurate. Is this your
> reason for choosing runnable time?
It might be a tradeoff between accuracy of scheduling and CPU cost of
scheduling, but I have to defer to Peter Z, Paul Turner, and the rest
of the scheduler guys on this one.
Thanx, Paul
> Do you have any thoughts or comments on how entity load tracking could
> be applied to introspectively select tasks for appropriate CPUs in
> system like big.LITTLE?
>
> Best regards,
> Morten
>
next prev parent reply other threads:[~2012-03-13 16:49 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-02 1:38 [RFC PATCH 00/14] sched: entity load-tracking re-work Paul Turner
2012-02-02 1:38 ` [RFC PATCH 04/14] sched: maintain the load contribution of blocked entities Paul Turner
2012-02-16 12:25 ` Peter Zijlstra
2012-02-17 11:53 ` Paul Turner
2012-02-02 1:38 ` [RFC PATCH 03/14] sched: aggregate load contributed by task entities on parenting cfs_rq Paul Turner
2012-02-02 1:38 ` [RFC PATCH 01/14] sched: track the runnable average on a per-task entitiy basis Paul Turner
2012-02-15 23:37 ` Peter Zijlstra
2012-02-17 11:43 ` Paul Turner
2012-02-16 13:27 ` Peter Zijlstra
2012-02-17 11:44 ` Paul Turner
2012-02-02 1:38 ` [RFC PATCH 06/14] sched: aggregate total task_group load Paul Turner
2012-02-17 4:41 ` Nikunj A Dadhania
2012-02-17 10:52 ` Paul Turner
2012-02-02 1:38 ` [RFC PATCH 02/14] sched: maintain per-rq runnable averages Paul Turner
2012-02-02 1:38 ` [RFC PATCH 05/14] sched: account for blocked load waking back up Paul Turner
2012-02-16 15:57 ` Peter Zijlstra
2012-02-17 13:00 ` Paul Turner
2012-02-16 16:02 ` Peter Zijlstra
2012-02-17 11:39 ` Paul Turner
2012-02-02 1:38 ` [RFC PATCH 08/14] sched: normalize tg load contributions against runnable time Paul Turner
2012-02-15 23:36 ` Peter Zijlstra
2012-02-17 12:32 ` Paul Turner
2012-02-20 16:10 ` Peter Zijlstra
2012-02-17 12:34 ` Peter Zijlstra
2012-02-15 23:38 ` Peter Zijlstra
2012-02-02 1:38 ` [RFC PATCH 07/14] sched: compute load contribution by a group entity Paul Turner
2012-02-02 1:38 ` [RFC PATCH 12/14] sched: update_cfs_shares at period edge Paul Turner
2012-02-02 1:38 ` [RFC PATCH 09/14] sched: maintain runnable averages across throttled periods Paul Turner
2012-02-02 1:38 ` [RFC PATCH 14/14] sched: implement usage tracking Paul Turner
2012-02-16 13:37 ` Peter Zijlstra
2012-02-17 10:54 ` Paul Turner
2012-02-20 16:11 ` Peter Zijlstra
2012-02-16 16:58 ` Peter Zijlstra
2012-02-17 11:32 ` Paul Turner
2012-02-20 16:30 ` Peter Zijlstra
2012-02-29 10:37 ` sched per task ARM fix Pantelis Antoniou
2012-02-29 10:37 ` [PATCH 1/2] sched: entity load-tracking re-work - Fix for ARM Pantelis Antoniou
2012-02-28 17:45 ` Morten Rasmussen
2012-02-28 17:52 ` Pantelis Antoniou
2012-02-29 10:37 ` [PATCH 2/2] sched: load-tracking compile when cgroup undefined Pantelis Antoniou
2012-03-13 16:57 ` [RFC PATCH 14/14] sched: implement usage tracking Vincent Guittot
2012-03-14 15:01 ` Peter Zijlstra
2012-03-14 15:45 ` Vincent Guittot
2012-03-14 15:47 ` Paul Turner
2012-03-15 10:52 ` Peter Zijlstra
2012-03-14 15:44 ` Paul Turner
2012-02-02 1:38 ` [RFC PATCH 13/14] sched: make __update_entity_runnable_avg() fast Paul Turner
2012-02-06 20:48 ` Peter Zijlstra
2012-02-17 12:49 ` Paul Turner
2012-02-02 1:38 ` [RFC PATCH 10/14] sched: replace update_shares weight distribution with per-entity computation Paul Turner
2012-02-02 1:38 ` [RFC PATCH 11/14] sched: refactor update_shares_cpu() -> update_blocked_avgs() Paul Turner
2012-02-06 20:02 ` [RFC PATCH 00/14] sched: entity load-tracking re-work Peter Zijlstra
2012-02-17 9:07 ` Nikunj A Dadhania
2012-02-17 10:48 ` Paul Turner
2012-02-20 9:41 ` Nikunj A Dadhania
2012-02-21 2:33 ` Paul Turner
2012-02-20 17:01 ` Peter Zijlstra
2012-03-12 10:39 ` Morten Rasmussen
2012-03-13 16:44 ` Paul E. McKenney [this message]
2012-03-13 17:08 ` Anca Emanuel
2012-03-13 17:23 ` Paul E. McKenney
2012-03-14 9:03 ` Amit Kucheria
2012-03-14 19:19 ` Paul E. McKenney
2012-03-13 17:28 ` Peter Zijlstra
2012-03-12 10:57 ` Vincent Guittot
2012-03-14 15:59 ` Paul Turner
2012-03-15 9:59 ` Vincent Guittot
2012-04-25 13:07 ` Vincent Guittot
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=20120313164403.GJ2349@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=Morten.Rasmussen@arm.com \
--cc=Robin.Randhawa@arm.com \
--cc=a.p.zijlstra@chello.nl \
--cc=bsegall@google.com \
--cc=efault@gmx.de \
--cc=kamalesh@linux.vnet.ibm.com \
--cc=linaro-sched-sig@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=pjt@google.com \
--cc=svaidy@linux.vnet.ibm.com \
--cc=vatsa@in.ibm.com \
--cc=venki@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox