From: Byungchul Park <byungchul.park@lge.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
Chris Metcalf <cmetcalf@ezchip.com>,
Thomas Gleixner <tglx@linutronix.de>,
Luiz Capitulino <lcapitulino@redhat.com>,
Christoph Lameter <cl@linux.com>,
"Paul E . McKenney" <paulmck@linux.vnet.ibm.com>,
Mike Galbraith <efault@gmx.de>, Rik van Riel <riel@redhat.com>
Subject: Re: [PATCH 1/4] sched: Don't account tickless CPU load on tick
Date: Mon, 1 Feb 2016 19:05:13 +0900 [thread overview]
Message-ID: <20160201100513.GD29804@X58A-UD3R> (raw)
In-Reply-To: <20160129095016.GZ6356@twins.programming.kicks-ass.net>
On Fri, Jan 29, 2016 at 10:50:16AM +0100, Peter Zijlstra wrote:
> On Thu, Jan 28, 2016 at 05:01:26PM +0100, Frederic Weisbecker wrote:
> > So lets check all the things we call on scheduler_tick():
> >
> > _ sched_clock_tick(): maybe it doesn't need to be called when idle. I'm not sure.
> > Some code in idle (timers, irqs, ...) might need to call sched_clock().
>
> Only needed if you've got a shady TSC.
Yeh.. IMO, this can be done without the tick handling during nohz, with the
patch I am attaching. Could you check the patch? Or we have to handle it
remotely, too. (for a crazy TSC)
>
> > _ update_rq_clock(), task_tick(): task_tick is empty for idle class, so we probably
> > don't need an updated rq either.
>
> Right, for regular NOHZ we'll be running the idle task, and the idle
> tick handler is empty. So for NOHZ you can ignore this.
>
> For NOHZ_FULL you'll not be running the idle task and this gets
> 'interesting'.
>
> The most important part would be tracking the task runtime, which is
> used for a number of user visible things. This should be doable
> remotely.
Isn't there any way to show it to user at the time it's requested?
>
> > _ update_cpu_load_active(): I was about to fix the issue properly and make it account
> > correctly on idle ticks but we might as well want to spare it.
>
> Right, we've gone over this one in detail in other emails I think.
Doing it remotely... hm...
>
> > _ calc_global_load_tick(): no idea
>
> Can easily be done remote. However, this only records deltas of
> nr_active (:= nr_running + nr_uninterruptible) and for NOHZ and
> NOHZ_FULL this should not change, therefore the delta _should_ be 0 and
> you can skip this.
It sounds good.
>
> > _ perf_event_task_tick(): needed, some freq CPU events can trigger in idle and need
> > adjustments
>
> Right, this is a tricky one. Maybe I should look into moving this into a
> hrtimer, but that too has 'fun' problems IIRC. I'll put it on the TODO
> list somewhere.
Good luck. I'm sure you'll do well.
>
> > _ trigger_load_balance(): maybe needed, I see it triggers the softirq after some
> > rebalance delay, regardless of the current CPU idleness.
>
> We already have NOHZ remote balancing, we could (and should) probably do
I think so.
> the same for NOHZ_FULL. Then again, I would expect the NOHZ_FULL cpus to
> not actually be part of a balance domain, so we could probably detect
Could not the NOHZ_FULL cpus be part of a balance domain? It sounds good.
> and short-circuit this.
>
> > _ rq_last_tick_reset(): not needed in idle
>
> Right, part of the NOHZ_FULL 'hack', once you fix all the remote
> accounting stuff this could go away entirely think.
I'm sure it can be removed eventually!
next prev parent reply other threads:[~2016-02-01 10:05 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-13 16:01 [RFC PATCH 0/4] sched: Improve cpu load accounting with nohz Frederic Weisbecker
2016-01-13 16:01 ` [PATCH 1/4] sched: Don't account tickless CPU load on tick Frederic Weisbecker
2016-01-19 13:08 ` Peter Zijlstra
2016-01-19 16:22 ` Frederic Weisbecker
2016-01-19 18:56 ` Peter Zijlstra
2016-01-19 22:33 ` Frederic Weisbecker
2016-01-20 5:43 ` Byungchul Park
2016-01-20 10:26 ` Byungchul Park
2016-01-28 16:01 ` Frederic Weisbecker
2016-01-29 9:50 ` Peter Zijlstra
2016-02-01 10:05 ` Byungchul Park [this message]
2016-02-01 10:09 ` [PATCH] sched: calculate sched_clock_cpu without tick handling during nohz Byungchul Park
2016-02-01 10:34 ` [PATCH 1/4] sched: Don't account tickless CPU load on tick Peter Zijlstra
2016-02-01 23:51 ` Byungchul Park
2016-02-02 0:50 ` Byungchul Park
2016-02-01 6:33 ` Byungchul Park
2016-01-20 8:42 ` Thomas Gleixner
2016-01-20 17:36 ` Frederic Weisbecker
2016-01-22 8:40 ` Byungchul Park
2016-01-13 16:01 ` [PATCH 2/4] sched: Consolidate nohz CPU load update code Frederic Weisbecker
2016-01-14 2:30 ` Byungchul Park
2016-01-19 13:13 ` Peter Zijlstra
2016-01-20 0:51 ` Byungchul Park
2016-01-14 5:18 ` Byungchul Park
2016-01-19 13:13 ` Peter Zijlstra
2016-01-19 16:49 ` Frederic Weisbecker
2016-01-20 1:41 ` Byungchul Park
2016-02-29 11:14 ` [tip:sched/core] sched/fair: " tip-bot for Frederic Weisbecker
2016-01-13 16:01 ` [RFC PATCH 3/4] sched: Move cpu load stats functions above fair queue callbacks Frederic Weisbecker
2016-01-13 16:01 ` [RFC PATCH 4/4] sched: Upload nohz full CPU load on task enqueue/dequeue Frederic Weisbecker
2016-01-19 13:17 ` Peter Zijlstra
2016-01-19 17:03 ` Frederic Weisbecker
2016-01-20 9:09 ` Peter Zijlstra
2016-01-20 14:54 ` Frederic Weisbecker
2016-01-20 15:11 ` Thomas Gleixner
2016-01-20 15:19 ` Christoph Lameter
2016-01-20 16:52 ` Frederic Weisbecker
2016-01-20 16:45 ` Frederic Weisbecker
2016-01-20 16:56 ` Peter Zijlstra
2016-01-20 17:21 ` Frederic Weisbecker
2016-01-20 18:25 ` Peter Zijlstra
2016-01-21 13:25 ` Frederic Weisbecker
2016-01-20 9:03 ` Thomas Gleixner
2016-01-20 14:31 ` Frederic Weisbecker
2016-01-20 14:43 ` Thomas Gleixner
2016-01-20 16:40 ` Frederic Weisbecker
2016-01-20 16:42 ` Christoph Lameter
2016-01-20 16:47 ` Frederic Weisbecker
2016-01-14 21:19 ` [RFC PATCH 0/4] sched: Improve cpu load accounting with nohz Dietmar Eggemann
2016-01-14 21:27 ` Peter Zijlstra
2016-01-14 22:23 ` Dietmar Eggemann
2016-01-15 7:07 ` Byungchul Park
2016-01-15 16:56 ` Dietmar Eggemann
2016-01-18 0:23 ` Byungchul Park
2016-01-19 13:04 ` Peter Zijlstra
2016-01-20 0:48 ` Byungchul Park
2016-01-20 13:04 ` Dietmar Eggemann
2016-02-29 11:14 ` [tip:sched/core] sched/fair: Avoid using decay_load_missed() with a negative value tip-bot for 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=20160201100513.GD29804@X58A-UD3R \
--to=byungchul.park@lge.com \
--cc=cl@linux.com \
--cc=cmetcalf@ezchip.com \
--cc=efault@gmx.de \
--cc=fweisbec@gmail.com \
--cc=lcapitulino@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=riel@redhat.com \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).