Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1312997

Re: [PATCH 1/4] sched: Don't account tickless CPU load on tick

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH 1/4] sched: Don't account tickless CPU load on tick
Date 2016-01-20 09:50 +0100
Message-ID <qSWCJ-3V7-7@gated-at.bofh.it> (permalink)
References <qQw9J-2at-33@gated-at.bofh.it> <qQw9J-2at-37@gated-at.bofh.it> <qSEcO-8kf-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, 19 Jan 2016, Peter Zijlstra wrote:

> On Wed, Jan 13, 2016 at 05:01:28PM +0100, Frederic Weisbecker wrote:
> > The cpu load update on tick doesn't care about dynticks and as such is
> > buggy when occuring on nohz ticks (including idle ticks) as it resets
> > the jiffies snapshot that was recorded on nohz entry. We eventually
> > ignore the potentially long tickless load that happened before the
> > tick.
> 
> I don't get it, how can we call scheduler_tick() while
> tick_nohz_tick_stopped() ?

tick->nohz_stopped is merily indicating that we switched from periodic mode to
tickless mode. That's probably a misnomer, but it still has that meaning.

You really need to look at it from the history of that code which was designed
for tickless idle. The nohz full stuff was bolted on it.

So if we stop the tick in idle - or for that matter in full nohz - we look
ahead when the next tick is required. That can be:

      - a timer wheel timer expiring

      - other stuff which prevents the cpu from going "tickless" like rcu,
        irqwork

So lets assume rcu and irqwork are silent, but we have a timer expiring 100ms
from now, then we program the tick timer to 100ms from now. When it fires it
invokes the normal tick_sched() timer machinery:

     - timekeeping update
     - update_process_times
     - profile_tick

I have no idea why that is a problem. If update_process_times() is invoked
then it will account the elapsed time to the idle task in case of tickless
idle. In case of nohz full it should simply account the time to the task which
was busy on the cpu in user space.

The above changelog is just crap and doesnt make any sense at all. And the
patch is fixing symptoms not the root cause.

Thanks,

	tglx

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 1/4] sched: Don't account tickless CPU load on tick Peter Zijlstra <peterz@infradead.org> - 2016-01-19 14:10 +0100
  Re: [PATCH 1/4] sched: Don't account tickless CPU load on tick Frederic Weisbecker <fweisbec@gmail.com> - 2016-01-19 17:30 +0100
    Re: [PATCH 1/4] sched: Don't account tickless CPU load on tick Peter Zijlstra <peterz@infradead.org> - 2016-01-19 20:00 +0100
      Re: [PATCH 1/4] sched: Don't account tickless CPU load on tick Frederic Weisbecker <fweisbec@gmail.com> - 2016-01-19 23:40 +0100
        Re: [PATCH 1/4] sched: Don't account tickless CPU load on tick Byungchul Park <byungchul.park@lge.com> - 2016-01-20 06:50 +0100
          Re: [PATCH 1/4] sched: Don't account tickless CPU load on tick Byungchul Park <byungchul.park@lge.com> - 2016-01-20 11:30 +0100
  Re: [PATCH 1/4] sched: Don't account tickless CPU load on tick Thomas Gleixner <tglx@linutronix.de> - 2016-01-20 09:50 +0100
    Re: [PATCH 1/4] sched: Don't account tickless CPU load on tick Frederic Weisbecker <fweisbec@gmail.com> - 2016-01-20 18:40 +0100
    Re: [PATCH 1/4] sched: Don't account tickless CPU load on tick Byungchul Park <byungchul.park@lge.com> - 2016-01-22 09:50 +0100

csiph-web