Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1369887
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/4] sched: Correctly handle nohz ticks cpu load accounting |
| Date | 2016-04-02 09:20 +0200 |
| Message-ID | <rjo0F-kA-5@gated-at.bofh.it> (permalink) |
| References | <rj7jb-4UU-9@gated-at.bofh.it> <rj7jc-4UU-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Apr 01, 2016 at 03:23:05PM +0200, Frederic Weisbecker wrote:
> Ticks can happen in the middle of a nohz frame and
I'm still miffed with that.. And this changelog doesn't even explain why
and how.
> cpu_load_update_active() doesn't handle these correctly. It forgets the
> whole previous tickless load and just records the current tick, ignoring
> potentially long idle periods.
>
> In order to solve this, record the load on nohz frame entry so we know
> what to record in case of nohz interruptions, then use this recorded load
> to account the tickless load on nohz ticks and nohz frame end.
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index f33764d..394f008 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -4527,9 +4527,9 @@ decay_load_missed(unsigned long load, unsigned long missed_updates, int idx)
> * term. See the @active paramter.
^^^^^^^^^^^^^^
What active parameter... you need to update that comment.
> */
> static void __cpu_load_update(struct rq *this_rq, unsigned long this_load,
> - unsigned long pending_updates, int active)
> + unsigned long pending_updates)
> {
> - unsigned long tickless_load = active ? this_rq->cpu_load[0] : 0;
> + unsigned long tickless_load = this_rq->cpu_load[0];
> int i, scale;
>
> this_rq->nr_load_updates++;
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 2/4] sched: Correctly handle nohz ticks cpu load accounting Frederic Weisbecker <fweisbec@gmail.com> - 2016-04-01 15:30 +0200
Re: [PATCH 2/4] sched: Correctly handle nohz ticks cpu load accounting Peter Zijlstra <peterz@infradead.org> - 2016-04-02 09:20 +0200
Re: [PATCH 2/4] sched: Correctly handle nohz ticks cpu load accounting Frederic Weisbecker <fweisbec@gmail.com> - 2016-04-02 14:40 +0200
csiph-web