Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1323012
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals |
| Date | 2016-02-01 12:40 +0100 |
| Message-ID | <qXkZP-1UH-9@gated-at.bofh.it> (permalink) |
| References | <qWuyd-51K-15@gated-at.bofh.it> <qWuyd-51K-13@gated-at.bofh.it> <qWF0C-4FU-11@gated-at.bofh.it> <qWHYv-7qu-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals riel@redhat.com - 2016-01-30 04:40 +0100
Re: [PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals kbuild test robot <lkp@intel.com> - 2016-01-30 06:00 +0100
Re: [PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals Frederic Weisbecker <fweisbec@gmail.com> - 2016-01-30 15:50 +0100
Re: [PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals Rik van Riel <riel@redhat.com> - 2016-01-30 19:00 +0100
Re: [PATCH 1/4] sched,time: remove non-power-of-two divides from __acct_update_integrals Peter Zijlstra <peterz@infradead.org> - 2016-02-01 12:40 +0100
csiph-web