[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20160201113010.GR6357@twins.programming.kicks-ass.net>
Date: Mon, 1 Feb 2016 12:30:10 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Rik van Riel <riel@...hat.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>,
linux-kernel@...r.kernel.org, tglx@...utronix.de, mingo@...nel.org,
luto@...capital.net, clark@...hat.com
Subject: Re: [PATCH 1/4] sched,time: remove non-power-of-two divides from
__acct_update_integrals
On Sat, Jan 30, 2016 at 12:53:09PM -0500, Rik van Riel wrote:
> >> + delta = cputime_to_nsecs(dtime);
> >
> > You might want to add a comment specifying why we don't call cputime_to_usecs()
> > directly (because we optimize if delta < TICK_NSEC).
> >
> > Although this has a good impact on nohz_full, it might have a tiny bad one on !nohz_full
> > because now we first convert jiffies to nsecs (which implies a multiplication by 1000)
> > that we later divide again by 1000. Now this is ok because I plan to convert tsk->utime/stime
> > to nsecs and thus remove most of the cputime_t use and conversions everywhere.
>
> Isn't cputime_t in nanoseconds even on !nohz_full systems nowadays,
> due to sched_clock?
Don't think so, we still use jiffy accounting for !NOHZ_FULL.
> Also, a multiplication is essentially instantaneous compared to
> a division, which is why Peter suggested going this way around.
Yep.
Powered by blists - more mailing lists