Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1351079
| From | Thomas Gleixner <tglx@linutronix.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] sched/cputime: steal_account_process_tick() should return jiffies |
| Date | 2016-03-06 12:10 +0100 |
| Message-ID | <r9EJs-4dl-7@gated-at.bofh.it> (permalink) |
| References | <r9717-5Id-11@gated-at.bofh.it> <r9hDc-4Hl-1@gated-at.bofh.it> <r9khH-6FU-5@gated-at.bofh.it> <r9ykG-8bj-1@gated-at.bofh.it> <r9zgJ-w6-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sat, 5 Mar 2016, Chris Friesen wrote: > The callers of steal_account_process_tick() expect it to return > whether a jiffy should be considered stolen or not. > > Currently the return value of steal_account_process_tick() is in > units of cputime, which vary between either jiffies or nsecs > depending on CONFIG_VIRT_CPU_ACCOUNTING_GEN. > > If cputime has nsecs granularity and there is a tiny amount of > stolen time (a few nsecs, say) then we will consider the entire > tick stolen and will not account the tick on user/system/idle, > causing /proc/stats to show invalid data. > > The fix is to change steal_account_process_tick() to accumulate > the stolen time and only account it once it's worth a jiffy. > > (Thanks to Frederic Weisbecker for suggestions to fix a bug in my > first version of the patch.) > > Signed-off-by: Chris Friesen <chris.friesen@windriver.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] steal_account_process_tick() should return jiffies Chris Friesen <cbf123@mail.usask.ca> - 2016-03-05 00:10 +0100
Re: [PATCH] steal_account_process_tick() should return jiffies Thomas Gleixner <tglx@linutronix.de> - 2016-03-05 11:30 +0100
Re: [PATCH] steal_account_process_tick() should return jiffies Frederic Weisbecker <fweisbec@gmail.com> - 2016-03-05 14:20 +0100
Re: [PATCH] steal_account_process_tick() should return jiffies Chris Friesen <cbf123@mail.usask.ca> - 2016-03-06 05:20 +0100
[PATCH v2] sched/cputime: steal_account_process_tick() should return jiffies Chris Friesen <cbf123@mail.usask.ca> - 2016-03-06 06:20 +0100
Re: [PATCH v2] sched/cputime: steal_account_process_tick() should return jiffies Thomas Gleixner <tglx@linutronix.de> - 2016-03-06 12:10 +0100
Re: [PATCH v2] sched/cputime: steal_account_process_tick() should return jiffies Frederic Weisbecker <fweisbec@gmail.com> - 2016-03-08 13:40 +0100
[tip:sched/core] sched/cputime: Fix steal_account_process_tick() to always return jiffies tip-bot for Chris Friesen <tipbot@zytor.com> - 2016-03-08 14:20 +0100
csiph-web