All of lore.kernel.org
 help / color / mirror / Atom feed
From: Preeti Murthy <preeti.lkml@gmail.com>
To: Alex Shi <alex.shi@linaro.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Morten Rasmussen <Morten.Rasmussen@arm.com>
Cc: 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 15:24:13 +0530	[thread overview]
Message-ID: <CAM4v1pPH54OHehb1i-esXTMsGJ-n7ck3V8yDK_rwajVCSmdU1A@mail.gmail.com> (raw)
In-Reply-To: <5361982F.3080307@linaro.org>

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?
Of course with this patchset this might not be possible, but
I have elaborated my point  below.

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.

I observed this when looking at tuned. Tuned sets the cpu_dma_latency
depending on what it reads from /proc/loadavg. This would mean
for a small number of short running tasks also this metric could
reflect a number which makes it look like the system is loaded
reasonably. It then disables deep idle states by setting a high
pm_qos latency requirement for system. This is bad because
it disables power savings even on a lightly loaded system. This
is just an example of how users of /proc/loadavg could make
the wrong decisions based on an inaccurate measure of system
load.

Do you think we must take a look again at the avenrun[] array
and update it to reflect the right cpu load average?

Regards
Preeti U Murthy

  reply	other threads:[~2014-05-06  9:54 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 [this message]
2014-05-06 11:39       ` Peter Zijlstra
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=CAM4v1pPH54OHehb1i-esXTMsGJ-n7ck3V8yDK_rwajVCSmdU1A@mail.gmail.com \
    --to=preeti.lkml@gmail.com \
    --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=peterz@infradead.org \
    --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 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.