lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ