From: Frederic Weisbecker <[email protected]>

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 <[email protected]>
Cc: Alessio Igor Bogani <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Avi Kivity <[email protected]>
Cc: Chris Metcalf <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Daniel Lezcano <[email protected]>
Cc: Geoff Levand <[email protected]>
Cc: Gilad Ben Yossef <[email protected]>
Cc: Hakan Akkan <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Kevin Hilman <[email protected]>
Cc: Max Krasnyansky <[email protected]>
Cc: Paul E. McKenney <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephen Hemminger <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: Sven-Thorsten Dietrich <[email protected]>
Cc: Thomas Gleixner <[email protected]>
---
 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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to