From: byungchul.park@lge.com
To: mingo@kernel.org, peterz@infradead.org
Cc: linux-kernel@vger.kernel.org, Byungchul Park <byungchul.park@lge.com>
Subject: [RFC] sched: make update_cpu_load_active care more than one tick
Date: Thu, 13 Aug 2015 18:35:24 +0900 [thread overview]
Message-ID: <1439458524-14145-1-git-send-email-byungchul.park@lge.com> (raw)
From: Byungchul Park <byungchul.park@lge.com>
i found do_timer accounts other than one tick, so i made
update_cpu_load_active care that.
is it intended because of its overhead?
Signed-off-by: Byungchul Park <byungchul.park@lge.com>
---
kernel/sched/fair.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index ffa70dc..cd3d98f 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4506,12 +4506,15 @@ void update_cpu_load_nohz(void)
*/
void update_cpu_load_active(struct rq *this_rq)
{
+ unsigned long curr_jiffies = READ_ONCE(jiffies);
+ unsigned long pending_updates;
unsigned long load = this_rq->cfs.runnable_load_avg;
/*
* See the mess around update_idle_cpu_load() / update_cpu_load_nohz().
*/
- this_rq->last_load_update_tick = jiffies;
- __update_cpu_load(this_rq, load, 1);
+ pending_updates = curr_jiffies - this_rq->last_load_update_tick;
+ this_rq->last_load_update_tick = curr_jiffies;
+ __update_cpu_load(this_rq, load, pending_updates);
}
/* Used instead of source_load when we know the type == 0 */
--
1.7.9.5
next reply other threads:[~2015-08-13 9:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-13 9:35 byungchul.park [this message]
2015-08-17 23:39 ` Byungchul Park
2015-09-09 6:00 ` Byungchul Park
2015-09-09 7:02 ` Peter Zijlstra
2015-09-09 7:31 ` Byungchul Park
2015-09-09 7:47 ` Byungchul Park
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=1439458524-14145-1-git-send-email-byungchul.park@lge.com \
--to=byungchul.park@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.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
all inboxes | Powered by JetHome®