[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170925213421.GC560070@devbig577.frc2.facebook.com>
Date: Mon, 25 Sep 2017 14:34:21 -0700
From: Tejun Heo <tj@...nel.org>
To: lizefan@...wei.com, hannes@...xchg.org, peterz@...radead.org,
mingo@...hat.com, longman@...hat.com
Cc: cgroups@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel-team@...com, pjt@...gle.com, luto@...capital.net,
efault@....de, torvalds@...ux-foundation.org, guro@...com
Subject: [PATCH cgroup/for-4.15] sched/cputime: Add dummy cputime_adjust()
implementation for CONFIG_VIRT_CPU_ACCOUNTING_NATIVE
Hello,
Another follow-up fix. I missed a dummy implementation leading to
bulid failure on s390. Because the bug and fix are trivial, I
directly applied the patch to cgroup/for-4.15. Please let me know if
it should be routed differently.
Thanks.
------ 8< ------
>From 8157a7faf94135386bf04b1cf94e6efd3fb94702 Mon Sep 17 00:00:00 2001
From: Tejun Heo <tj@...nel.org>
Date: Mon, 25 Sep 2017 14:27:54 -0700
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
cfb766da54d9 ("sched/cputime: Expose cputime_adjust()") made
cputime_adjust() public for cgroup basic cpu stat support; however,
the commit forgot to add a dummy implementaiton for
CONFIG_VIRT_CPU_ACCOUNTING_NATIVE leading to compiler errors on some
s390 configurations.
Fix it by adding the missing dummy implementation.
Reported-by: “kbuild-all@...org” <kbuild-all@...org>
Fixes: cfb766da54d9 ("sched/cputime: Expose cputime_adjust()")
Signed-off-by: Tejun Heo <tj@...nel.org>
---
kernel/sched/cputime.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c
index e01b699..5498f20 100644
--- a/kernel/sched/cputime.c
+++ b/kernel/sched/cputime.c
@@ -447,6 +447,13 @@ void vtime_account_irq_enter(struct task_struct *tsk)
EXPORT_SYMBOL_GPL(vtime_account_irq_enter);
#endif /* __ARCH_HAS_VTIME_ACCOUNT */
+void cputime_adjust(struct task_cputime *curr, struct prev_cputime *prev,
+ u64 *ut, u64 *st)
+{
+ *ut = curr->utime;
+ *st = curr->stime;
+}
+
void task_cputime_adjusted(struct task_struct *p, u64 *ut, u64 *st)
{
*ut = p->utime;
--
2.9.5
Powered by blists - more mailing lists