Messages in this thread Patch in this message | | | Date | Mon, 29 Oct 2012 16:27:28 -0400 | From | Steven Rostedt <> | Subject | [PATCH 17/32] nohz/cpuset: Flush cputimes on procfs stat file read |
| |
From: Frederic Weisbecker <fweisbec@gmail.com>
When we read a process's procfs stat file, we need to flush the cputimes of the tasks running in nohz cpusets in case some childs in the thread group are running there.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Alessio Igor Bogani <abogani@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Avi Kivity <avi@redhat.com> Cc: Chris Metcalf <cmetcalf@tilera.com> Cc: Christoph Lameter <cl@linux.com> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Geoff Levand <geoff@infradead.org> Cc: Gilad Ben Yossef <gilad@benyossef.com> Cc: Hakan Akkan <hakanakkan@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Kevin Hilman <khilman@ti.com> Cc: Max Krasnyansky <maxk@qualcomm.com> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephen Hemminger <shemminger@vyatta.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Sven-Thorsten Dietrich <thebigcorporation@gmail.com> Cc: Thomas Gleixner <tglx@linutronix.de> --- fs/proc/array.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/fs/proc/array.c b/fs/proc/array.c index c1c207c..f7e1fdc 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -406,6 +406,8 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns, cutime = cstime = utime = stime = 0; cgtime = gtime = 0; + /* For thread group times */ + cpuset_nohz_flush_cputimes(); if (lock_task_sighand(task, &flags)) { struct signal_struct *sig = task->signal; -- 1.7.10.4
| |