From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751884AbdANKB6 (ORCPT ); Sat, 14 Jan 2017 05:01:58 -0500 Received: from terminus.zytor.com ([198.137.202.10]:47418 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751759AbdANKB5 (ORCPT ); Sat, 14 Jan 2017 05:01:57 -0500 Date: Sat, 14 Jan 2017 02:00:55 -0800 From: tip-bot for Frederic Weisbecker Message-ID: Cc: wanpeng.li@hotmail.com, benh@kernel.crashing.org, mpe@ellerman.id.au, mingo@kernel.org, tglx@linutronix.de, riel@redhat.com, fweisbec@gmail.com, peterz@infradead.org, sgruszka@redhat.com, borntraeger@de.ibm.com, linux-kernel@vger.kernel.org, paulus@samba.org, fenghua.yu@intel.com, heiko.carstens@de.ibm.com, schwidefsky@de.ibm.com, tony.luck@intel.com, torvalds@linux-foundation.org, hpa@zytor.com Reply-To: fweisbec@gmail.com, sgruszka@redhat.com, peterz@infradead.org, tglx@linutronix.de, riel@redhat.com, paulus@samba.org, fenghua.yu@intel.com, borntraeger@de.ibm.com, linux-kernel@vger.kernel.org, benh@kernel.crashing.org, wanpeng.li@hotmail.com, mingo@kernel.org, mpe@ellerman.id.au, torvalds@linux-foundation.org, hpa@zytor.com, tony.luck@intel.com, heiko.carstens@de.ibm.com, schwidefsky@de.ibm.com In-Reply-To: <1483636310-6557-3-git-send-email-fweisbec@gmail.com> References: <1483636310-6557-3-git-send-email-fweisbec@gmail.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:sched/core] sched/cputime, ia64: Fix incorrect start cputime assignment on task switch Git-Commit-ID: 8388d21468e7e7656867b67ab2ec98a78c9ad799 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 8388d21468e7e7656867b67ab2ec98a78c9ad799 Gitweb: http://git.kernel.org/tip/8388d21468e7e7656867b67ab2ec98a78c9ad799 Author: Frederic Weisbecker AuthorDate: Thu, 5 Jan 2017 18:11:42 +0100 Committer: Ingo Molnar CommitDate: Sat, 14 Jan 2017 09:54:11 +0100 sched/cputime, ia64: Fix incorrect start cputime assignment on task switch On task switch we must initialize the current cputime of the next task using the value of the previous task which got freshly updated. But we are confusing that with doing the opposite, which should result in incorrect cputime accounting. Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Cc: Benjamin Herrenschmidt Cc: Christian Borntraeger Cc: Fenghua Yu Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Michael Ellerman Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Rik van Riel Cc: Stanislaw Gruszka Cc: Tony Luck Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1483636310-6557-3-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar --- arch/ia64/kernel/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c index 71775b95..637e741 100644 --- a/arch/ia64/kernel/time.c +++ b/arch/ia64/kernel/time.c @@ -83,7 +83,7 @@ void arch_vtime_task_switch(struct task_struct *prev) struct thread_info *pi = task_thread_info(prev); struct thread_info *ni = task_thread_info(current); - pi->ac_stamp = ni->ac_stamp; + ni->ac_stamp = pi->ac_stamp; ni->ac_stime = ni->ac_utime = 0; }