public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Preeti Murthy <preeti.lkml@gmail.com>
Cc: Alex Shi <alex.shi@linaro.org>,
	Morten Rasmussen <Morten.Rasmussen@arm.com>,
	mingo@redhat.com, Vincent Guittot <vincent.guittot@linaro.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Mike Galbraith <efault@gmx.de>,
	wangyun@linux.vnet.ibm.com, LKML <linux-kernel@vger.kernel.org>,
	Mel Gorman <mgorman@suse.de>,
	Preeti U Murthy <preeti@linux.vnet.ibm.com>
Subject: Re: [RESEND PATCH V5 0/8] remove cpu_load idx
Date: Tue, 6 May 2014 13:39:36 +0200	[thread overview]
Message-ID: <20140506113936.GF11096@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <CAM4v1pPH54OHehb1i-esXTMsGJ-n7ck3V8yDK_rwajVCSmdU1A@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1493 bytes --]

On Tue, May 06, 2014 at 03:24:13PM +0530, Preeti Murthy wrote:
> Hi Morten, Peter, Alex,
> 
> In a similar context, I noticed that /proc/loadavg makes use of
> avenrun[] array which keeps track of the history of the global
> load average. This however makes use of the sum of
> nr_running + nr_uninterruptible per cpu. Why are we not
> using the cpu_load[] array here which also keeps track
> of the history of per-cpu load and then return a sum of it?

Entirely different kind of 'load'. Note that you cannot use
->nr_uninterruptible per-cpu, also note that sched/proc.c doesn't.

> Using nr_running to show the global load average would
> be misleading when entire load balancing is being done on the
> basis of the history of cfs_rq->runnable_load_avg/cpu_load[]
> right? IOW, to the best of my understanding we do not use
> nr_running anywhere to directly determine cpu load in the kernel.
> 
> My idea was that the global/per_cpu load that we reflect via
> proc/sys interfaces must be consistent. I haven't really
> looked at what /proc/schedstat, /proc/stat, top are all reading
> from. But /proc/loadavg is reading out global nr_running +
> waiting tasks when this will not give us the accurate picture
> of the system load especially when there are many short running
> tasks.

Nobody said /proc/loadavg is a sane number, but its what it is and since
its a global number its entirely unsuited for balancing -- not to
mention all other reasons its crap.


[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2014-05-06 11:39 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-16  2:43 [RESEND PATCH V5 0/8] remove cpu_load idx Alex Shi
2014-04-16  2:43 ` [PATCH V5 1/8] sched: shortcut to remove load_idx Alex Shi
2014-04-16  2:43 ` [PATCH V5 2/8] sched: remove rq->cpu_load[load_idx] array Alex Shi
2014-04-16  2:43 ` [PATCH V5 3/8] sched: remove source_load and target_load Alex Shi
2014-04-24 14:18   ` Peter Zijlstra
2014-04-16  2:43 ` [PATCH V5 4/8] sched: remove LB_BIAS Alex Shi
2014-04-16  2:43 ` [PATCH V5 5/8] sched: clean up cpu_load update Alex Shi
2014-04-16  2:43 ` [PATCH V5 6/8] sched: rewrite update_cpu_load_nohz Alex Shi
2014-04-16  2:43 ` [PATCH V5 7/8] sched: remove rq->cpu_load and rq->nr_load_updates Alex Shi
2014-04-16  2:43 ` [PATCH V5 8/8] sched: rename update_*_cpu_load Alex Shi
2014-04-24 16:20 ` [RESEND PATCH V5 0/8] remove cpu_load idx Peter Zijlstra
2014-04-29 15:04   ` Morten Rasmussen
2014-05-09 16:30     ` Alex Shi
2014-05-01  0:41   ` Alex Shi
2014-05-06  9:54     ` Preeti Murthy
2014-05-06 11:39       ` Peter Zijlstra [this message]
2014-05-08  9:10         ` Preeti U Murthy
2014-04-29 14:52 ` Morten Rasmussen
2014-04-30  9:24   ` Alex Shi
2014-05-06  8:33     ` Alex Shi
2014-05-06 11:43       ` Peter Zijlstra
2014-05-09 16:41         ` Alex Shi

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=20140506113936.GF11096@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=Morten.Rasmussen@arm.com \
    --cc=alex.shi@linaro.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=preeti.lkml@gmail.com \
    --cc=preeti@linux.vnet.ibm.com \
    --cc=vincent.guittot@linaro.org \
    --cc=wangyun@linux.vnet.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox