[opensuse-kernel] kernel 3.10-rc2 breaks CPU usage reporting
See https://bugzilla.novell.com/show_bug.cgi?id=821422 all tools I tried (vmstat, top, gkrellm) all report 0% cpu usage. Very unlikely to be true :-) -- Stefan Seyfried "If your lighter runs out of fluid or flint and stops making fire, and you can't be bothered to figure out about lighter fluid or flint, that is not Zippo's fault." -- bkw -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
On Thu, 23 May 2013, Stefan Seyfried wrote:
See https://bugzilla.novell.com/show_bug.cgi?id=821422
all tools I tried (vmstat, top, gkrellm) all report 0% cpu usage. Very unlikely to be true :-)
CONFIG_NOHZ_FULL is very likely the culprit, as there are reports of it causing various CPU accounting breakages. Still being debugged upstream. -- Jiri Kosina SUSE Labs -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
El 23/05/13 10:23, Jiri Kosina escribió:
On Thu, 23 May 2013, Stefan Seyfried wrote:
See https://bugzilla.novell.com/show_bug.cgi?id=821422
all tools I tried (vmstat, top, gkrellm) all report 0% cpu usage. Very unlikely to be true :-)
CONFIG_NOHZ_FULL is very likely the culprit, as there are reports of it causing various CPU accounting breakages. Still being debugged upstream.
I have another problem, my sandy bridge laptop CPU used to run about 800 mhz when AFK, now no matter what I do is over 2000 mhz and the CPU fan never shuts up. It seems the problem surfaced between rc1 and rc2. -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
Am 23.05.2013 16:23, schrieb Jiri Kosina:
On Thu, 23 May 2013, Stefan Seyfried wrote:
See https://bugzilla.novell.com/show_bug.cgi?id=821422
all tools I tried (vmstat, top, gkrellm) all report 0% cpu usage. Very unlikely to be true :-)
CONFIG_NOHZ_FULL is very likely the culprit, as there are reports of it causing various CPU accounting breakages. Still being debugged upstream.
It's not getting better with rc3 and from what I read CONFIG_NOHZ_FULL is not some kind of killer feature. Could we disable this until it no longer breaks everything and the kitchen sink? Best regards, Stefan -- Stefan Seyfried "If your lighter runs out of fluid or flint and stops making fire, and you can't be bothered to figure out about lighter fluid or flint, that is not Zippo's fault." -- bkw -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
On 6/1/13 3:41 PM, Stefan Seyfried wrote:
Am 23.05.2013 16:23, schrieb Jiri Kosina:
On Thu, 23 May 2013, Stefan Seyfried wrote:
See https://bugzilla.novell.com/show_bug.cgi?id=821422
all tools I tried (vmstat, top, gkrellm) all report 0% cpu usage. Very unlikely to be true :-)
CONFIG_NOHZ_FULL is very likely the culprit, as there are reports of it causing various CPU accounting breakages. Still being debugged upstream.
It's not getting better with rc3 and from what I read CONFIG_NOHZ_FULL is not some kind of killer feature. Could we disable this until it no longer breaks everything and the kitchen sink?
Mike - Do I recall correctly that you have a fix for this? Or could Stefan have the bad hardware you were worried about? -Jeff -- Jeff Mahoney SUSE Labs
On Sun, 2013-06-02 at 19:33 -0400, Jeff Mahoney wrote:
On 6/1/13 3:41 PM, Stefan Seyfried wrote:
Am 23.05.2013 16:23, schrieb Jiri Kosina:
On Thu, 23 May 2013, Stefan Seyfried wrote:
See https://bugzilla.novell.com/show_bug.cgi?id=821422
all tools I tried (vmstat, top, gkrellm) all report 0% cpu usage. Very unlikely to be true :-)
CONFIG_NOHZ_FULL is very likely the culprit, as there are reports of it causing various CPU accounting breakages. Still being debugged upstream.
It's not getting better with rc3 and from what I read CONFIG_NOHZ_FULL is not some kind of killer feature. Could we disable this until it no longer breaks everything and the kitchen sink?
Mike -
Do I recall correctly that you have a fix for this? Or could Stefan have the bad hardware you were worried about?
The below should fix the accounting woes for unstable tsc boxen. These boxen are excluded from playing tickless though. Frederic sent this out, but it's still not found it's way to Linus for some reason. From: Frederic Weisbecker <fweisbec@gmail.com> To: LKML <linux-kernel@vger.kernel.org> Cc: Frederic Weisbecker <fweisbec@gmail.com>, Steven Rostedt <rostedt@goodmis.org>, "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>, Ingo Molnar <mingo@kernel.org>, Thomas Gleixner <tglx@linutronix.de>, Peter Zijlstra <peterz@infradead.org>, Borislav Petkov <bp@alien8.de>, Li Zhong <zhong@linux.vnet.ibm.com>, Mike Galbraith <efault@gmx.de> Subject: [PATCH 2/8] vtime: Use consistent clocks among nohz accounting Date: Mon, 20 May 2013 18:01:50 +0200 While computing the cputime delta of dynticks CPUs, we are mixing up clocks of differents natures: * local_clock() which takes care of unstable clock sources and fix these if needed. * sched_clock() which is the weaker version of local_clock(). It doesn't compute any fixup in case of unstable source. If the clock source is stable, those two clocks are the same and we can safely compute the difference against two random points. Otherwise it results in random deltas as sched_clock() can randomly drift away, back or forward, from local_clock(). As a consequence, some strange behaviour with unstable tsc has been observed such as non progressing constant zero cputime. (The 'top' command showing no load). Fix this by only using local_clock(), or its irq safe/remote equivalent, in vtime code. Reported-by: Mike Galbraith <efault@gmx.de> Suggested-by: Mike Galbraith <efault@gmx.de> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Li Zhong <zhong@linux.vnet.ibm.com> Cc: Mike Galbraith <efault@gmx.de> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> --- include/linux/vtime.h | 4 ++-- kernel/sched/core.c | 2 +- kernel/sched/cputime.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/linux/vtime.h b/include/linux/vtime.h index 71a5782..b1dd2db 100644 --- a/include/linux/vtime.h +++ b/include/linux/vtime.h @@ -34,7 +34,7 @@ static inline void vtime_user_exit(struct task_struct *tsk) } extern void vtime_guest_enter(struct task_struct *tsk); extern void vtime_guest_exit(struct task_struct *tsk); -extern void vtime_init_idle(struct task_struct *tsk); +extern void vtime_init_idle(struct task_struct *tsk, int cpu); #else static inline void vtime_account_irq_exit(struct task_struct *tsk) { @@ -45,7 +45,7 @@ static inline void vtime_user_enter(struct task_struct *tsk) { } static inline void vtime_user_exit(struct task_struct *tsk) { } static inline void vtime_guest_enter(struct task_struct *tsk) { } static inline void vtime_guest_exit(struct task_struct *tsk) { } -static inline void vtime_init_idle(struct task_struct *tsk) { } +static inline void vtime_init_idle(struct task_struct *tsk, int cpu) { } #endif #ifdef CONFIG_IRQ_TIME_ACCOUNTING diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 58453b8..e1a27f9 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -4745,7 +4745,7 @@ void __cpuinit init_idle(struct task_struct *idle, int cpu) */ idle->sched_class = &idle_sched_class; ftrace_graph_init_idle_task(idle, cpu); - vtime_init_idle(idle); + vtime_init_idle(idle, cpu); #if defined(CONFIG_SMP) sprintf(idle->comm, "%s/%d", INIT_TASK_COMM, cpu); #endif diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c index cc2dc3ee..b5ccba2 100644 --- a/kernel/sched/cputime.c +++ b/kernel/sched/cputime.c @@ -747,17 +747,17 @@ void arch_vtime_task_switch(struct task_struct *prev) write_seqlock(¤t->vtime_seqlock); current->vtime_snap_whence = VTIME_SYS; - current->vtime_snap = sched_clock(); + current->vtime_snap = sched_clock_cpu(smp_processor_id()); write_sequnlock(¤t->vtime_seqlock); } -void vtime_init_idle(struct task_struct *t) +void vtime_init_idle(struct task_struct *t, int cpu) { unsigned long flags; write_seqlock_irqsave(&t->vtime_seqlock, flags); t->vtime_snap_whence = VTIME_SYS; - t->vtime_snap = sched_clock(); + t->vtime_snap = sched_clock_cpu(cpu); write_sequnlock_irqrestore(&t->vtime_seqlock, flags); } -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
Hi all, Am 03.06.2013 03:40, schrieb Mike Galbraith:
On Sun, 2013-06-02 at 19:33 -0400, Jeff Mahoney wrote:
Do I recall correctly that you have a fix for this? Or could Stefan have the bad hardware you were worried about?
My beloved X200s is not "bad"! ;-)
The below should fix the accounting woes for unstable tsc boxen. These boxen are excluded from playing tickless though. Frederic sent this out, but it's still not found it's way to Linus for some reason.
From: Frederic Weisbecker <fweisbec@gmail.com> To: LKML <linux-kernel@vger.kernel.org> Cc: Frederic Weisbecker <fweisbec@gmail.com>, Steven Rostedt <rostedt@goodmis.org>, "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>, Ingo Molnar <mingo@kernel.org>, Thomas Gleixner <tglx@linutronix.de>, Peter Zijlstra <peterz@infradead.org>, Borislav Petkov <bp@alien8.de>, Li Zhong <zhong@linux.vnet.ibm.com>, Mike Galbraith <efault@gmx.de> Subject: [PATCH 2/8] vtime: Use consistent clocks among nohz accounting Date: Mon, 20 May 2013 18:01:50 +0200
Yes, this works well for me in my home-built 3.10.0-rc3-0.g244eade-desktop Best regards, seife -- Stefan Seyfried "If your lighter runs out of fluid or flint and stops making fire, and you can't be bothered to figure out about lighter fluid or flint, that is not Zippo's fault." -- bkw -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
On 6/3/13 5:21 AM, Stefan Seyfried wrote:
Hi all,
Am 03.06.2013 03:40, schrieb Mike Galbraith:
On Sun, 2013-06-02 at 19:33 -0400, Jeff Mahoney wrote:
Do I recall correctly that you have a fix for this? Or could Stefan have the bad hardware you were worried about?
My beloved X200s is not "bad"! ;-)
The below should fix the accounting woes for unstable tsc boxen. These boxen are excluded from playing tickless though. Frederic sent this out, but it's still not found it's way to Linus for some reason.
From: Frederic Weisbecker <fweisbec@gmail.com> To: LKML <linux-kernel@vger.kernel.org> Cc: Frederic Weisbecker <fweisbec@gmail.com>, Steven Rostedt <rostedt@goodmis.org>, "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>, Ingo Molnar <mingo@kernel.org>, Thomas Gleixner <tglx@linutronix.de>, Peter Zijlstra <peterz@infradead.org>, Borislav Petkov <bp@alien8.de>, Li Zhong <zhong@linux.vnet.ibm.com>, Mike Galbraith <efault@gmx.de> Subject: [PATCH 2/8] vtime: Use consistent clocks among nohz accounting Date: Mon, 20 May 2013 18:01:50 +0200
Yes, this works well for me in my home-built 3.10.0-rc3-0.g244eade-desktop
Ok, I've pulled it into master. Thanks for testing. -Jeff -- Jeff Mahoney SUSE Labs
El 23/05/13 10:08, Stefan Seyfried escribió:
See https://bugzilla.novell.com/show_bug.cgi?id=821422
all tools I tried (vmstat, top, gkrellm) all report 0% cpu usage. Very unlikely to be true :-)
I have no problem with htop, however plain old top does indeed report 0% cpu usage.. -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
Am 02.06.2013 03:11, schrieb Cristian Rodríguez:
El 23/05/13 10:08, Stefan Seyfried escribió:
See https://bugzilla.novell.com/show_bug.cgi?id=821422
all tools I tried (vmstat, top, gkrellm) all report 0% cpu usage. Very unlikely to be true :-)
I have no problem with htop, however plain old top does indeed report 0% cpu usage..
htop is also broken for me. both CPUs total at 0% but to compensate for that every process has 200% :-) I booted with nohz=off, hoping this would help (but it doesn't). CPU is a plain old core2 duo, family 6, model 10, stepping 23. Best regards, Stefan -- Stefan Seyfried "If your lighter runs out of fluid or flint and stops making fire, and you can't be bothered to figure out about lighter fluid or flint, that is not Zippo's fault." -- bkw -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
Am 02.06.2013 12:52, schrieb Stefan Seyfried:
I booted with nohz=off, hoping this would help (but it doesn't).
CPU is a plain old core2 duo, family 6, model 10, stepping 23.
I built a kernel with the following: seife@susi:~/kernel-desktop> cat config.addon/x86_64/desktop # CONFIG_NO_HZ_FULL is not set CONFIG_NO_HZ_IDLE=y CONFIG_TICK_CPU_ACCOUNTING=y # CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set # CONFIG_IRQ_TIME_ACCOUNTING is not set # CONFIG_RCU_NOCB_CPU_NONE is not set # CONFIG_RCU_NOCB_CPU_ZERO is not set And this one works as before. Unfortunately, the build service does not want to build it: seife@susi:~/kernel-desktop> osc bl openSUSE_Factory x86_64 could not retrieve ssl certificate: 400 remote error: /usr/local/sbin/bssign 256 not sure if I did something wrong (I linked to Kernel:HEAD/kernel-source) or if this is somehting with the build service. A local build worked. Best regards, seife -- Stefan Seyfried "If your lighter runs out of fluid or flint and stops making fire, and you can't be bothered to figure out about lighter fluid or flint, that is not Zippo's fault." -- bkw -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
Dnia niedziela, 2 czerwca 2013 19:00:18 Stefan Seyfried pisze:
seife@susi:~/kernel-desktop> osc bl openSUSE_Factory x86_64 could not retrieve ssl certificate: 400 remote error: /usr/local/sbin/bssign 256
Create a new sign key for repository which has kernel package. osc signkey --create <PRJ> -- Pozdrawiam / Best regards, Mariusz Fik openSUSE Community Member GPG: 5FCE 7241 B3B9 32FD 455B C30E 42D6 6C88 9E83 7C3D
participants (6)
-
Cristian Rodríguez
-
Jeff Mahoney
-
Jiri Kosina
-
Mariusz Fik
-
Mike Galbraith
-
Stefan Seyfried