Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1381405
| From | Byungchul Park <byungchul.park@lge.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/3] sched: Correctly handle nohz ticks cpu load accounting |
| Date | 2016-04-18 11:20 +0200 |
| Message-ID | <rpdvB-2TT-13@gated-at.bofh.it> (permalink) |
| References | <rntuO-23t-7@gated-at.bofh.it> <rntuP-23t-39@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Apr 13, 2016 at 03:56:51PM +0200, Frederic Weisbecker wrote:
> @@ -4645,11 +4674,11 @@ void cpu_load_update_nohz(int active)
> void cpu_load_update_active(struct rq *this_rq)
> {
> unsigned long load = weighted_cpuload(cpu_of(this_rq));
> - /*
> - * See the mess around cpu_load_update_idle() / cpu_load_update_nohz().
> - */
> - this_rq->last_load_update_tick = jiffies;
> - __cpu_load_update(this_rq, load, 1, 1);
> +
> + if (tick_nohz_tick_stopped())
> + cpu_load_update_nohz(this_rq, READ_ONCE(jiffies), load);
> + else
> + cpu_load_update_periodic(this_rq, load);
Considering it further, I wonder if needing it.
(Sorry if I missed something.)
Case 1. tickless -> (scheduler_tick) -> tickless
I am not sure for this case if the rq's load can be changed or not,
especially, if the rq's load can be changed *at this point*.
Please remind that the load[0] is set here.
Case 2. tickless -> (scheduler_tick) -> restart tick
Will be done by the tick restart routine when exiting irq.
-> no problem.
Case 3. tick -> (scheduler_tick) -> tickless
Same as before.
-> no problem.
Case 4. tick -> (scheduler_tick) -> tick
We can rely on regular schedule_tick().
-> no problem.
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH 2/3] sched: Correctly handle nohz ticks cpu load accounting Byungchul Park <byungchul.park@lge.com> - 2016-04-18 11:20 +0200
Re: [PATCH 2/3] sched: Correctly handle nohz ticks cpu load accounting Frederic Weisbecker <fweisbec@gmail.com> - 2016-04-18 15:40 +0200
Re: [PATCH 2/3] sched: Correctly handle nohz ticks cpu load accounting Byungchul Park <byungchul.park@lge.com> - 2016-04-19 02:10 +0200
Re: [PATCH 2/3] sched: Correctly handle nohz ticks cpu load accounting Frederic Weisbecker <fweisbec@gmail.com> - 2016-04-19 16:10 +0200
csiph-web