All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: fransklaver@gmail.com, hpa@zytor.com, fweisbec@gmail.com,
	torvalds@linux-foundation.org, riel@redhat.com,
	tglx@linutronix.de, wanpeng.li@hotmail.com,
	linux-kernel@vger.kernel.org, garsilva@embeddedor.com,
	sgruszka@redhat.com, linux-tip-commits@vger.kernel.org
Subject: Re: [tip:sched/core] sched/cputime: Refactor the cputime_adjust() code
Date: Tue, 4 Jul 2017 12:01:29 +0200	[thread overview]
Message-ID: <20170704100129.5kkzn24awk3uzdtk@gmail.com> (raw)
In-Reply-To: <20170704091731.oux3ejxhgspgrlqb@hirez.programming.kicks-ass.net>


* Peter Zijlstra <peterz@infradead.org> wrote:

> Argh, no... That code was perfectly fine. The new code otoh is
> convoluted crap.
> 
> It had the form:
> 
> 	if (exception1)
> 	  deal with exception1
> 
> 	if (execption2)
> 	  deal with exception2
> 
> 	do normal stuff
> 
> Which is as simple and straight forward as it gets.
> 
> The new code otoh reads like:
> 
> 	if (!exception1) {
> 		if (exception2)
> 		  deal with exception 2
> 		else
> 		  do normal stuff
> 	}
> 
> which is absolute shit.
> 
> So NAK on this.

Agreed - I've queued up a revert.

Note that I fixed the old comment, which was arguably wrong:

	/*
	 * If either stime or both stime and utime are 0, assume all runtime is
	 * userspace. Once a task gets some ticks, the monotonicy code at
	 * 'update' will ensure things converge to the observed ratio.
	 */

The correct comment is something like:

	/*
	 * If either stime or utime are 0, assume all runtime is userspace.
	 * Once a task gets some ticks, the monotonicy code at 'update:'
	 * will ensure things converge to the observed ratio.
	 */

Thanks,

	Ingo

      reply	other threads:[~2017-07-04 10:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-27 23:03 [kernel-sched-cputime] question about probable bug in cputime_adjust() Gustavo A. R. Silva
2017-06-28  5:35 ` Frans Klaver
2017-06-28  6:03   ` Frans Klaver
2017-06-28 23:57     ` Gustavo A. R. Silva
2017-06-29  4:51       ` Frans Klaver
2017-06-29 17:58         ` Gustavo A. R. Silva
2017-06-29 18:41           ` [PATCH] sched/cputime: code refactoring " Gustavo A. R. Silva
2017-06-30 13:10             ` [tip:sched/core] sched/cputime: Refactor the cputime_adjust() code tip-bot for Gustavo A. R. Silva
2017-06-30 14:00               ` Rik van Riel
2017-06-30 14:41                 ` Frans Klaver
2017-06-30 15:46                   ` Frederic Weisbecker
2017-06-30 16:17               ` Stanislaw Gruszka
2017-07-04  9:17               ` Peter Zijlstra
2017-07-04 10:01                 ` Ingo Molnar [this message]

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=20170704100129.5kkzn24awk3uzdtk@gmail.com \
    --to=mingo@kernel.org \
    --cc=fransklaver@gmail.com \
    --cc=fweisbec@gmail.com \
    --cc=garsilva@embeddedor.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=riel@redhat.com \
    --cc=sgruszka@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=wanpeng.li@hotmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.