public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linaro-kernel@lists.linaro.org, mingo@kernel.org,
	linux@arm.linux.org.uk, pjt@google.com, santosh.shilimkar@ti.com,
	morten.rasmussen@arm.com, chander.kashyap@linaro.org,
	cmetcalf@tilera.com, tony.luck@intel.com, alex.shi@intel.com,
	paulmck@linux.vnet.ibm.com, tglx@linutronix.de,
	len.brown@intel.com, arjan@linux.intel.com,
	amit.kucheria@linaro.org, corbet@lwn.net
Subject: Re: [RFC PATCH v3 3/6] sched: pack small tasks
Date: Fri, 26 Apr 2013 12:30:19 +0200	[thread overview]
Message-ID: <20130426103019.GE8669@dyad.programming.kicks-ass.net> (raw)
In-Reply-To: <CAKfTPtCphgnT6_WSdHJR+_GcdfroL+OFhiqsr_rBFx5=apkTVQ@mail.gmail.com>

On Wed, Mar 27, 2013 at 12:00:40PM +0100, Vincent Guittot wrote:
> On 27 March 2013 11:21, Preeti U Murthy <preeti@linux.vnet.ibm.com> wrote:
> > Hi,
> >
> > On 03/26/2013 05:56 PM, Peter Zijlstra wrote:
> >> On Fri, 2013-03-22 at 13:25 +0100, Vincent Guittot wrote:
> >>> +static bool is_buddy_busy(int cpu)
> >>> +{
> >>> +       struct rq *rq = cpu_rq(cpu);
> >>> +
> >>> +       /*
> >>> +        * A busy buddy is a CPU with a high load or a small load with
> >>> a lot of
> >>> +        * running tasks.
> >>> +        */
> >>> +       return (rq->avg.runnable_avg_sum >
> >>> +                       (rq->avg.runnable_avg_period / (rq->nr_running
> >>> + 2)));
> >>> +}
> >>
> >> Why does the comment talk about load but we don't see it in the
> >> equation. Also, why does nr_running matter at all? I thought we'd
> >> simply bother with utilization, if fully utilized we're done etc..
> 
> By load, I mean : 100 * avg.runnable_avg_sum / avg.runnable_avg_period
> In addition, i take into account the number of tasks already in the
> runqueue in order to define the business of a CPU. A CPU with a load
> of 50% without any tasks in the runqeue in not busy at this time and
> we can migrate tasks on it but if the CPU already has 2 tasks in its
> runqueue, it means that newly wake up task will have to share the CPU
> with other tasks so we consider that the CPU is already busy and we
> will fall back to default behavior. The equation considers that a CPU
> is not busy if
> 100 * avg.runnable_avg_sum / avg.runnable_avg_period < 100 / (nr_running + 2)

I'm still somewhat confused by all this. So raising nr_running will lower the
required utilization to be considered busy. Suppose we have 50 tasks running,
all at 1% utilization (bulk wakeup) we'd consider the cpu busy, even though its
picking its nose for half the time.


I'm assuming it's mean to limit process latency or so? Why are you concerned
with that? This seems like an arbitrary power vs performance tweak without
solid effidence its needed or even wanted.

  reply	other threads:[~2013-04-26 10:31 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-22 12:25 [RFC PATCH v3 0/6] sched: packing small tasks Vincent Guittot
2013-03-22 12:25 ` [RFC PATCH v3 1/6] Revert "sched: Introduce temporary FAIR_GROUP_SCHED dependency for load-tracking" Vincent Guittot
2013-03-22 12:25 ` [RFC PATCH v3 2/6] sched: add a new SD_SHARE_POWERDOMAIN flag for sched_domain Vincent Guittot
2013-03-22 12:25 ` [RFC PATCH v3 3/6] sched: pack small tasks Vincent Guittot
2013-03-26 12:26   ` Peter Zijlstra
2013-03-27 10:21     ` Preeti U Murthy
2013-03-27 11:00       ` Vincent Guittot
2013-04-26 10:30         ` Peter Zijlstra [this message]
2013-04-26 11:34           ` Vincent Guittot
2013-04-26 10:18       ` Peter Zijlstra
2013-04-26 10:32         ` Preeti U Murthy
2013-03-26 12:37   ` Peter Zijlstra
2013-03-26 13:00     ` Vincent Guittot
2013-03-27  4:33     ` Preeti U Murthy
2013-03-27  4:48       ` Alex Shi
2013-03-27  8:51         ` Peter Zijlstra
2013-03-26 12:46   ` Peter Zijlstra
2013-03-26 13:53     ` Vincent Guittot
2013-03-26 15:29     ` Arjan van de Ven
2013-03-27  8:46       ` Peter Zijlstra
2013-03-27  8:54         ` Vincent Guittot
2013-03-27  9:00           ` Peter Zijlstra
     [not found]             ` <20130327111855.GI801@MacBook-Pro.local>
     [not found]               ` <1364393634.5053.71.camel@laptop>
     [not found]                 ` <20130327163642.GA1136@localhost.cambridge.arm.com>
2013-03-27 17:18                   ` Nicolas Pitre
2013-03-27 17:37                     ` Catalin Marinas
2013-03-27 15:37           ` Nicolas Pitre
2013-03-22 12:25 ` [RFC PATCH v3 4/6] sched: secure access to other CPU statistics Vincent Guittot
2013-03-26 12:50   ` Peter Zijlstra
2013-03-26 13:06     ` Vincent Guittot
2013-03-22 12:25 ` [RFC PATCH v3 5/6] sched: pack the idle load balance Vincent Guittot
2013-03-26 12:52   ` Peter Zijlstra
2013-03-26 14:03     ` Vincent Guittot
2013-03-26 14:42       ` Peter Zijlstra
2013-03-26 15:55         ` Vincent Guittot
2013-03-27  4:56           ` Alex Shi
2013-03-27  8:05             ` Vincent Guittot
2013-03-27  8:47               ` Alex Shi
2013-03-27 10:30                 ` Vincent Guittot
2013-03-27 13:32                   ` Alex Shi
2013-03-27  8:49             ` Peter Zijlstra
2013-04-05 11:08         ` Vincent Guittot
2013-04-22  5:45           ` Preeti U Murthy
     [not found]             ` <CAKfTPtCCCifC=c+xjjnAH_HSqkR80PiQoddQKXPHuZwZawbvcA@mail.gmail.com>
2013-04-23  2:23               ` Alex Shi
2013-04-23  4:57                 ` Preeti U Murthy
2013-04-23 15:30                 ` Arjan van de Ven
2013-04-26 10:54                   ` Peter Zijlstra
2013-04-23  4:36               ` Preeti U Murthy
2013-03-22 12:25 ` [RFC PATCH v3 6/6] ARM: sched: clear SD_SHARE_POWERDOMAIN Vincent Guittot
2013-03-23 11:55 ` [RFC PATCH v3 0/6] sched: packing small tasks Preeti U Murthy
2013-03-25  9:58   ` 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=20130426103019.GE8669@dyad.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=alex.shi@intel.com \
    --cc=amit.kucheria@linaro.org \
    --cc=arjan@linux.intel.com \
    --cc=chander.kashyap@linaro.org \
    --cc=cmetcalf@tilera.com \
    --cc=corbet@lwn.net \
    --cc=len.brown@intel.com \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mingo@kernel.org \
    --cc=morten.rasmussen@arm.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=pjt@google.com \
    --cc=santosh.shilimkar@ti.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=vincent.guittot@linaro.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